VS_method.RdVS_method applies the chosen variable-selection algorithm to each leading set produced by S3VS at every iteration.
VS_method(y, X, family, surv_model = NULL, vsel_method, alpha = 0.5,
p_thresh = 0.1, gamma = 0.9, verbose = FALSE)Response. If family = "normal", a numeric vector. If family = "binomial", a numeric/integer/logical vector with values in {0,1}. If family = "survival", a list with components time and status (1 = event, 0 = censored).
Predictor matrix. Can be a base matrix or something as.matrix() can coerce. No missing values are allowed.
Model family; one of c("normal","binomial","survival"). Determines which engine is called (VS_method_LM, VS_method_GLM, or VS_method_SURV).
Character string specifying the survival model (family="survival" only). Must be explicitly provided; there is no default. Values are "Cox" for proportional hazards models, "AFT" for accelerated failure time models.
Character string indicating the variable-selection engine used inside S3VS at each iteration. Allowed values depend on family: for family = "normal"(S3VS_LM) and "binomial" (S3VS_GLM), available options are "NLP", "ENET", "LASSO", "SCAD", "MCP"; for family = "survival", available options are "LASSO", "ENET" for surv_model = "COX" and "AFTGEE", "BRIDGE", "PVAFT" for surv_model = "AFT". See Details for more information.
Only used when vsel_method == "ENET". Elastic net mixing parameter, with \(\alpha \in (0,1)\).
Only used for surv_model = "AFT" with vsel_method = "AFTGEE". p-value threshold for variable selection.
Details to come...
A list containing:
Character vector with names of the selected predictors.
Character vector with names of the predictors not selected.
# Simulate continuous data
set.seed(123)
n <- 100
p <- 150
X <- matrix(rnorm(n * p), n, p)
colnames(X) <- paste0("V", 1:p)
y <- X[,1] + 0.5 * X[,2] + rnorm(n)
# Run VS_method
VS_method(y, X, family = "normal", vsel_method = "NLP", verbose = FALSE)
#> $sel
#> [1] "V1"
#>
#> $nosel
#> [1] "V2" "V3" "V4" "V5" "V6" "V7" "V8" "V9" "V10" "V11"
#> [11] "V12" "V13" "V14" "V15" "V16" "V17" "V18" "V19" "V20" "V21"
#> [21] "V22" "V23" "V24" "V25" "V26" "V27" "V28" "V29" "V30" "V31"
#> [31] "V32" "V33" "V34" "V35" "V36" "V37" "V38" "V39" "V40" "V41"
#> [41] "V42" "V43" "V44" "V45" "V46" "V47" "V48" "V49" "V50" "V51"
#> [51] "V52" "V53" "V54" "V55" "V56" "V57" "V58" "V59" "V60" "V61"
#> [61] "V62" "V63" "V64" "V65" "V66" "V67" "V68" "V69" "V70" "V71"
#> [71] "V72" "V73" "V74" "V75" "V76" "V77" "V78" "V79" "V80" "V81"
#> [81] "V82" "V83" "V84" "V85" "V86" "V87" "V88" "V89" "V90" "V91"
#> [91] "V92" "V93" "V94" "V95" "V96" "V97" "V98" "V99" "V100" "V101"
#> [101] "V102" "V103" "V104" "V105" "V106" "V107" "V108" "V109" "V110" "V111"
#> [111] "V112" "V113" "V114" "V115" "V116" "V117" "V118" "V119" "V120" "V121"
#> [121] "V122" "V123" "V124" "V125" "V126" "V127" "V128" "V129" "V130" "V131"
#> [131] "V132" "V133" "V134" "V135" "V136" "V137" "V138" "V139" "V140" "V141"
#> [141] "V142" "V143" "V144" "V145" "V146" "V147" "V148" "V149" "V150"
#>