Given a candidate predictor matrix X and an optional unnamed
covariate matrix C, builds the design [1, X, C] and removes
rank-deficient columns from X until the design has full column rank.
Rank-deficient columns are identified via the pivot of
qr([1, X, C]). On each iteration, one problematic column is dropped
using drop_collinear_columns. If iterative pruning does not
achieve full rank, falls back to ld_prune_by_correlation at a
descending sequence of correlation thresholds.
Arguments
- X
Numeric matrix with column names (the predictors subject to pruning).
- C
Numeric matrix of covariates (can be unnamed) that will be kept. Pass
NULLor a zero-column matrix when there are no covariates.- strategy
Passed through to
drop_collinear_columns.- response
Passed through to
drop_collinear_columnswhenstrategy = "response_correlation".- max_iterations
Integer. Hard cap on the iterative-prune loop. Default 300.
- corr_thresholds
Numeric vector of |cor| thresholds used for the
ld_prune_by_correlationfallback, tried in order. Defaultseq(0.75, 0.5, by = -0.05).- verbose
Logical. If TRUE, print per-iteration progress. Default FALSE.