compare_selectors_single: Run all selectors once on a dataset
Description
Convenience wrapper that runs AIC/BIC/AICc stepwise, GAMLSS LASSO (and ENet
when available), and the pure glmnet IRLS selector, then collates coefficients
into a long table for comparison. Observations containing NA in either X
or Y are removed prior to fitting. Column names are temporarily shortened
to satisfy selector requirements and avoid clashes; the outputs remap them to
the original labels before returning so the reported variables always match
the input design.
Usage
compare_selectors_single(X, Y, include_enet = TRUE)
Value
A list with:
coefs
Named coefficient vectors for each selector.
table
Long data frame with columns selector, variable, coef, selected.
Arguments
X
Numeric matrix (n × p) of mean-submodel predictors.
Y
Numeric response in (0,1). Values are squeezed to (0,1) internally.
include_enet
Logical; include ENet if gamlss.lasso is installed.
set.seed(1)
X <- matrix(rnorm(300), 100, 3); Y <- plogis(X[, 1])
Y <- rbeta(100, Y * 30, (1 - Y) * 30)
single <- compare_selectors_single(X, Y, include_enet = FALSE)
head(single$table)