corrselect
Predictor pruning using association-based and model-based approaches. Fast, deterministic solutions with minimal code.
Many tools that remove correlated predictors pick one subset for you. In practice I saw many scientists choose their predictors by hand instead, by trial and error, until the correlations looked acceptable. I wanted to see all the choices.
corrselect lists every maximal subset of variables in which no pair exceeds a correlation threshold you set, so you can pick the subset that fits your question.
The package offers two main approaches: corrPrune() for association-based pruning that operates model-free on raw data, and modelPrune() for VIF-based iterative removal compatible with lm, glm, lme4, and glmmTMB engines. Both functions support a force_in parameter to protect important variables from removal.
Under the hood, corrselect implements exhaustive subset enumeration via graph algorithms (Eppstein–Löffler–Strash and Bron–Kerbosch methods). It supports multiple association metrics including Pearson, Spearman, Kendall correlations, as well as specialized measures like bicor, Cramér’s V, eta, and energy distance for mixed-type data. Deterministic tie-breaking ensures reproducibility across analyses.
The package benefits ecological and bioclimatic modeling, trait-based species selection, and interpretable machine learning workflows. Available on CRAN under MIT license.
install.packages("corrselect")
Citation
Colling G (2025). corrselect: Fast and Flexible Predictor Pruning. doi:10.32614/CRAN.package.corrselect