BMI_LASSO {BMIselect} | R Documentation |
Bayesian MI-LASSO for Multiply-Imputed Regression
Description
Fit a Bayesian multiple-imputation LASSO (BMI-LASSO) model across multiply-imputed datasets, using one of four priors: Multi-Laplace, Horseshoe, ARD, or Spike-Laplace. Automatically standardizes data, runs MCMC in parallel, performs variable selection via three-step projection predictive variable selection, and selects a final submodel by BIC.
Usage
BMI_LASSO(
X,
Y,
model,
standardize = TRUE,
SNC = TRUE,
grid = seq(0, 1, 0.01),
orthogonal = FALSE,
nburn = 4000,
npost = 4000,
seed = NULL,
nchain = 1,
ncores = 1,
verbose = TRUE,
printevery = 1000,
...
)
Arguments
X |
A numeric matrix or array of predictors. If a matrix |
Y |
A numeric vector or matrix of outcomes. If a vector of length |
model |
Character; which prior to use. One of |
standardize |
Logical; whether to normalize each |
SNC |
Logical; if |
grid |
Numeric vector; grid of scaled neighborhood criterion (or thresholding) to explore.
Default |
orthogonal |
Logical; if |
nburn |
Integer; number of burn-in MCMC iterations per chain. Default |
npost |
Integer; number of post-burn-in samples to retain per chain. Default |
seed |
Optional integer; base random seed. Each chain adds its index. |
nchain |
Integer; number of MCMC chains to run in parallel. Default |
ncores |
Integer; number of parallel cores to use. Default |
verbose |
Logical; print progress messages. Default |
printevery |
Integer; print status every so many iterations. Default |
... |
Additional model-specific hyperparameters:
|
Value
A named list with elements:
posterior
List of length
nchain
of MCMC outputs (posterior draws).select
List of length
nchain
of logical matrices showing which variables are selected at each grid value.best_select
List of length
nchain
of the single best selection (by BIC) for each chain.posterior_best_models
List of length
nchain
of projected posterior draws for the best submodel.bic_models
List of length
nchain
of BIC values and degrees-of-freedom for each candidate submodel.summary_table_full
A data frame summarizing rank-normalized split-Rhat and other diagnostics for the full model.
summary_table_selected
A data frame summarizing diagnostics for the selected submodel after projection.
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 <- BMI_LASSO(X, Y, model = "Horseshoe",
nburn = 100, npost = 100,
nchain = 1, ncores = 1)
str(fit$best_select)