MI_LASSO {BMIselect} | R Documentation |
Multiple-Imputation LASSO (MI-LASSO)
Description
Fit a LASSO-like penalty across D
multiply-imputed datasets by
iteratively reweighted ridge regressions (Equation (4) of the manuscript).
For each tuning parameter in lamvec
, it returns the pooled
coefficient estimates, the BIC, and the selected variables.
Usage
MI_LASSO(
X,
Y,
lamvec = (2^(seq(-1, 4, by = 0.05)))^2/2,
maxiter = 200,
eps = 1e-20,
ncores = 1
)
Arguments
X |
A matrix |
Y |
A vector length |
lamvec |
Numeric vector of penalty parameters |
maxiter |
Integer; maximum number of ridge–update iterations per |
eps |
Numeric; convergence tolerance on coefficient change. Default |
ncores |
Integer; number of cores for parallelizing over |
Value
If length(lamvec) > 1
, a list with elements:
best
List for the
lambda
with minimal BIC containing:coefficients
((p+1)×D
intercept + slopes),bic
(BIC scalar),varsel
(logical length-p
vector of selected predictors),lambda
(the chosen penalty).lambda_path
length(lamvec)×2
matrix of eachlambda
and its corresponding BIC.
If length(lamvec) == 1
, returns a single list (as above) for that
penalty.
Examples
sim <- sim_A(n = 100, p = 20, type = "MAR", SNP = 1.5, low_missing = TRUE, n_imp = 5, seed = 123)
X <- sim$data_MI$X
Y <- sim$data_MI$Y
fit <- MI_LASSO(X, Y, lamvec = c(0.1))