| Title: | Bayesian MI-LASSO for Variable Selection on Multiply-Imputed Datasets |
|---|---|
| Description: | Provides a suite of Bayesian MI-LASSO for variable selection methods for multiply-imputed datasets. The package includes four Bayesian MI-LASSO models using shrinkage (Multi-Laplace, Horseshoe, ARD) and Spike-and-Slab (Spike-and-Laplace) priors, along with tools for model fitting via MCMC, four-step projection predictive variable selection, and hyperparameter calibration. Methods are suitable for both continuous and binary covariates under missing-at-random or missing-completely-at-random assumptions. See Zou, J., Wang, S. and Chen, Q. (2025), Bayesian MI-LASSO for Variable Selection on Multiply-Imputed Data. ArXiv, 2211.00114. <doi:10.48550/arXiv.2211.00114> for more details. We also provide the frequentist`s MI-LASSO function. |
| Authors: | Jungang Zou [aut, cre], Sijian Wang [aut], Qixuan Chen [aut] |
| Maintainer: | Jungang Zou <[email protected]> |
| License: | Apache License (>= 2) |
| Version: | 1.0.3 |
| Built: | 2026-06-05 08:21:17 UTC |
| Source: | https://github.com/cran/BMIselect |
Implements Bayesian variable selection using the Automatic Relevance Determination (ARD) prior across multiply-imputed datasets. The ARD prior imposes feature-specific shrinkage by placing a prior proportional to inverse of precision of each coefficient.
ARD_mcmc( X, Y, intercept = TRUE, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )ARD_mcmc( X, Y, intercept = TRUE, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )
X |
A 3-D array of predictors with dimensions |
Y |
A matrix of outcomes with dimensions |
intercept |
Logical; include an intercept? Default |
nburn |
Integer; number of burn-in MCMC iterations. Default |
npost |
Integer; number of post-burn-in samples to retain. Default |
seed |
Integer or |
verbose |
Logical; print progress messages? Default |
printevery |
Integer; print progress every this many iterations. Default |
chain_index |
Integer; index of this MCMC chain (for labeling messages). Default |
A named list with components:
post_betaArray npost × D × p of sampled regression coefficients.
post_alphaMatrix npost × D of sampled intercepts (if used).
post_sigma2Numeric vector length npost, sampled residual variances.
post_psi2Matrix npost × p of sampled precision parameters for each coefficient.
post_fitted_YArray npost × D × n of posterior predictive draws (with noise).
post_pool_betaMatrix (npost * D) × p of pooled coefficient draws.
post_pool_fitted_YMatrix (npost * D) × n of pooled predictive draws (with noise).
hat_matrix_projMatrix D × n × n of averaged projection hat-matrices. To avoid recalculate for estimating degree of freedom.
sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- ARD_mcmc(X, Y, nburn = 100, npost = 100)sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- ARD_mcmc(X, Y, nburn = 100, npost = 100)
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 four-step projection predictive variable selection, and selects a final submodel by BIC.
BMI_LASSO( X, Y, model, standardize = TRUE, SNC = TRUE, grid = seq(0, 1, 0.01), orthogonal = FALSE, nburn = 4000, npost = 4000, seed = NULL, nchains = 1, ncores = 1, output_verbose = TRUE, printevery = 1000, ... )BMI_LASSO( X, Y, model, standardize = TRUE, SNC = TRUE, grid = seq(0, 1, 0.01), orthogonal = FALSE, nburn = 4000, npost = 4000, seed = NULL, nchains = 1, ncores = 1, output_verbose = TRUE, printevery = 1000, ... )
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. |
nchains |
Integer; number of MCMC chains to run in parallel. Default |
ncores |
Integer; number of parallel cores to use. Default |
output_verbose |
Logical; print progress messages. Default |
printevery |
Integer; print status every so many iterations. Default |
... |
Additional model-specific hyperparameters:
|
A named list with elements:
posteriorList of length nchains of MCMC outputs (posterior draws).
selectList of length nchains of logical matrices showing
which variables are selected at each grid value.
best_selectList of length nchains of the single best
selection (by BIC) for each chain.
posterior_best_modelsList of length nchains of projected
posterior draws for the best submodel.
bic_modelsList of length nchains of BIC values and
degrees-of-freedom for each candidate submodel.
summary_table_fullA data frame summarizing rank-normalized split-Rhat and other diagnostics for the full model.
summary_table_selectedA data frame summarizing diagnostics for the selected submodel after projection.
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, nchains = 1, ncores = 1) str(fit$best_select)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, nchains = 1, ncores = 1) str(fit$best_select)
Implements Bayesian variable selection using the hierarchical Horseshoe prior
across multiply-imputed datasets. This model applies global–local shrinkage
to regression coefficients via a global scale (tau2), local scales
(lambda2), and auxiliary hyperpriors (kappa, eta).
horseshoe_mcmc( X, Y, intercept = TRUE, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )horseshoe_mcmc( X, Y, intercept = TRUE, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )
X |
A 3-D array of predictors with dimensions |
Y |
A matrix of outcomes with dimensions |
intercept |
Logical; include an intercept term? Default |
nburn |
Integer; number of burn-in MCMC iterations. Default |
npost |
Integer; number of post-burn-in samples to retain. Default |
seed |
Integer or |
verbose |
Logical; print progress messages? Default |
printevery |
Integer; print progress every this many iterations. Default |
chain_index |
Integer; index of this MCMC chain (for labeling prints). Default |
A named list with components:
post_betaArray npost × D × p of sampled regression coefficients.
post_alphaMatrix npost × D of sampled intercepts (if used).
post_sigma2Numeric vector of length npost, sampled residual variances.
post_lambda2Matrix npost × p of local shrinkage parameters .
post_kappaMatrix npost × p of auxiliary local hyperparameters .
post_tau2Numeric vector of length npost, sampled global scale .
post_etaNumeric vector of length npost, sampled auxiliary global hyperparameter .
post_fitted_YArray npost × D × n of posterior predictive draws (with noise).
post_pool_betaMatrix (npost * D) × p of pooled coefficient draws.
post_pool_fitted_YMatrix (npost * D) × n of pooled predictive draws (with noise).
hat_matrix_projMatrix D × n × n of averaged projection hat-matrices. To avoid recalculate for estimating degree of freedom.
sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- horseshoe_mcmc(X, Y, nburn = 100, npost = 100)sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- horseshoe_mcmc(X, Y, nburn = 100, npost = 100)
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.
MI_LASSO( X, Y, lamvec = (2^(seq(-1, 4, by = 0.05)))^2/2, maxiter = 200, eps = 1e-20, ncores = 1 )MI_LASSO( X, Y, lamvec = (2^(seq(-1, 4, by = 0.05)))^2/2, maxiter = 200, eps = 1e-20, ncores = 1 )
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 |
If length(lamvec) > 1, a list with elements:
bestList for the 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_pathlength(lamvec)×2 matrix of each
lambda and its corresponding BIC.
If length(lamvec) == 1, returns a single list (as above) for that
penalty.
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))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))
Implements Bayesian variable selection under the Multi-Laplace prior on
regression coefficients across multiply-imputed datasets. The prior shares
local shrinkage parameters (lambda2) across imputations and places
a Gamma(h, v) hyperprior on the global parameter rho.
multi_laplace_mcmc( X, Y, intercept = TRUE, h = 2, v = NULL, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )multi_laplace_mcmc( X, Y, intercept = TRUE, h = 2, v = NULL, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )
X |
A 3-D array of predictors with dimensions |
Y |
A matrix of outcomes with dimensions |
intercept |
Logical; include an intercept? Default |
h |
Numeric; shape parameter of the Gamma prior on |
v |
Numeric or |
nburn |
Integer; number of burn-in iterations. Default |
npost |
Integer; number of post-burn-in samples to store. Default |
seed |
Integer or |
verbose |
Logical; print progress messages? Default |
printevery |
Integer; print progress every this many iterations. Default |
chain_index |
Integer; index of this MCMC chain (for messages). Default |
A named list with elements:
post_betaArray npost × D × p of sampled regression coefficients.
post_alphaMatrix npost × D of sampled intercepts (if used).
post_sigma2Numeric vector of length npost, sampled residual variances.
post_lambda2Matrix npost × p of sampled local shrinkage parameters.
post_rhoNumeric vector of length npost, sampled global parameters.
post_fitted_YArray npost × D × n of posterior predictive draws (with noise).
post_pool_betaMatrix (npost * D) × p of pooled coefficient draws.
post_pool_fitted_YMatrix (npost * D) × n of pooled predictive draws (with noise).
hat_matrix_projMatrix D × n × n of averaged projection hat-matrices. To avoid recalculate for estimating degree of freedom.
h, v
Numeric; the shape and scale hyperparameters used.
sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- multi_laplace_mcmc(X, Y, intercept = TRUE, nburn = 100, npost = 100)sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- multi_laplace_mcmc(X, Y, intercept = TRUE, nburn = 100, npost = 100)
Given posterior means of beta1_mat (and optional intercepts
alpha1_vec) from a full model fitted on D imputed
datasets, compute the predictive projection onto the submodel defined by
xs_vec. Returns the projected coefficients (and intercepts, if requested).
projection_mean(X_arr, beta1_mat, xs_vec, sigma2, alpha1_vec = NULL)projection_mean(X_arr, beta1_mat, xs_vec, sigma2, alpha1_vec = NULL)
X_arr |
A 3-D array of predictors, of dimension |
beta1_mat |
A |
xs_vec |
Logical vector of length |
sigma2 |
Numeric scalar; the residual variance from the full model (pooled across imputations). |
alpha1_vec |
Optional numeric vector of length |
A list with components:
beta2_matA D * p matrix of projected submodel coefficients.
alpha2_vec(If alpha1_vec provided) numeric vector length D of projected intercepts.
# Simulate a single imputation with n=50, p=5: D <- 3; n <- 50; p <- 5 X_arr <- array(rnorm(D * n * p), c(D, n, p)) beta1_mat <- matrix(rnorm(D * p), nrow = D) # Suppose full-model sigma2 pooled is 1.2 sigma2 <- 1.2 # Project onto predictors 1 and 4 only: xs_vec <- c(TRUE, FALSE, FALSE, TRUE, FALSE) proj <- projection_mean(X_arr, beta1_mat, xs_vec, sigma2) str(proj) # With intercept: alpha1_vec <- rnorm(D) proj2 <- projection_mean(X_arr, beta1_mat, xs_vec, sigma2, alpha1_vec) str(proj2)# Simulate a single imputation with n=50, p=5: D <- 3; n <- 50; p <- 5 X_arr <- array(rnorm(D * n * p), c(D, n, p)) beta1_mat <- matrix(rnorm(D * p), nrow = D) # Suppose full-model sigma2 pooled is 1.2 sigma2 <- 1.2 # Project onto predictors 1 and 4 only: xs_vec <- c(TRUE, FALSE, FALSE, TRUE, FALSE) proj <- projection_mean(X_arr, beta1_mat, xs_vec, sigma2) str(proj) # With intercept: alpha1_vec <- rnorm(D) proj2 <- projection_mean(X_arr, beta1_mat, xs_vec, sigma2, alpha1_vec) str(proj2)
Given posterior draws beta1_arr (and optional intercepts alpha1_arr)
from a full model fitted on D imputed datasets, compute
the predictive projection of each draw onto the submodel defined by xs_vec.
Returns the projected coefficients (and intercepts, if requested) plus the projected
residual variance for each posterior draw.
projection_posterior(X_arr, beta1_arr, sigma1_vec, xs_vec, alpha1_arr = NULL)projection_posterior(X_arr, beta1_arr, sigma1_vec, xs_vec, alpha1_arr = NULL)
X_arr |
A 3-D array of predictors, of dimension |
beta1_arr |
A |
sigma1_vec |
Numeric vector of length |
xs_vec |
Logical vector of length |
alpha1_arr |
Optional |
A list with components:
beta2_arrArray npost * D * p of projected submodel coefficients.
alpha2_arr(If alpha1_arr provided) matrix npost * D of projected intercepts.
sigma2_optNumeric vector length npost of projected residual variances.
D <- 3; n <- 50; p <- 5; npost <- 100 X_arr <- array(rnorm(D*n*p), c(D, n, p)) beta1_arr <- array(rnorm(npost*D*p), c(npost, D, p)) sigma1_vec <- runif(npost, 0.5, 2) xs_vec <- c(TRUE, FALSE, TRUE, FALSE, TRUE) # Without intercept proj <- projection_posterior(X_arr, beta1_arr, sigma1_vec, xs_vec) str(proj) # With intercept draws alpha1_arr <- matrix(rnorm(npost*D), nrow = npost, ncol = D) proj2 <- projection_posterior(X_arr, beta1_arr, sigma1_vec, xs_vec, alpha1_arr) str(proj2)D <- 3; n <- 50; p <- 5; npost <- 100 X_arr <- array(rnorm(D*n*p), c(D, n, p)) beta1_arr <- array(rnorm(npost*D*p), c(npost, D, p)) sigma1_vec <- runif(npost, 0.5, 2) xs_vec <- c(TRUE, FALSE, TRUE, FALSE, TRUE) # Without intercept proj <- projection_posterior(X_arr, beta1_arr, sigma1_vec, xs_vec) str(proj) # With intercept draws alpha1_arr <- matrix(rnorm(npost*D), nrow = npost, ncol = D) proj2 <- projection_posterior(X_arr, beta1_arr, sigma1_vec, xs_vec, alpha1_arr) str(proj2)
Generates a dataset for Scenario A used in Bayesian MI-LASSO benchmarking. Covariates are iid standard normal, with a fixed true coefficient vector, linear outcome, missingness imposed on specified columns under MCAR or MAR, and multiple imputations via predictive mean matching.
sim_A( n = 100, p = 20, type = "MAR", SNP = 1.5, low_missing = TRUE, n_imp = 5, seed = NULL )sim_A( n = 100, p = 20, type = "MAR", SNP = 1.5, low_missing = TRUE, n_imp = 5, seed = NULL )
n |
Integer. Number of observations. |
p |
Integer. Number of covariates (columns). Takes values in {20, 40}. |
type |
Character. Missingness mechanism: "MCAR" or "MAR". |
SNP |
Numeric. Signal-to-noise ratio controlling error variance. |
low_missing |
Logical. If TRUE, use low missingness rates; if FALSE, higher missingness. |
n_imp |
Integer. Number of multiple imputations to generate. |
seed |
Integer or NULL. Random seed for reproducibility. |
A list with components:
A list of complete covariate matrix and outcomes before missingness.
A list of covariate matrix and outcomes with missing values.
A list of array of imputed covariates (n_imp × n × p) and a matrix of imputed outcomes (n_imp × n).
A list of complete-case covariate matrix and outcomes.
Logical vector of true nonzero coefficient indices.
True covariance matrix used for X.
True coefficient vector.
sim <- sim_A(n = 100, p = 20, type = "MAR", SNP = 1.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)sim <- sim_A(n = 100, p = 20, type = "MAR", SNP = 1.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)
Generates a dataset for Scenario B used in Bayesian MI-LASSO benchmarking. Covariates are multivariate normal with AR(1) covariance, with a fixed true coefficient vector, linear outcome, missingness imposed on specified columns under MCAR or MAR, and multiple imputations via predictive mean matching.
sim_B( n = 100, p = 20, low_missing = TRUE, type = "MAR", SNP = 1.5, corr = 0.5, n_imp = 5, seed = NULL )sim_B( n = 100, p = 20, low_missing = TRUE, type = "MAR", SNP = 1.5, corr = 0.5, n_imp = 5, seed = NULL )
n |
Integer. Number of observations. |
p |
Integer. Number of covariates (columns). Takes values in {20, 40}. |
low_missing |
Logical. If TRUE, use low missingness rates; if FALSE, higher missingness. |
type |
Character. Missingness mechanism: "MCAR" or "MAR". |
SNP |
Numeric. Signal-to-noise ratio controlling error variance. |
corr |
Numeric. AR(1) correlation parameter |
n_imp |
Integer. Number of multiple imputations to generate. |
seed |
Integer or NULL. Random seed for reproducibility. |
A list with components:
A list of complete covariate matrix and outcomes before missingness.
A list of covariate matrix and outcomes with missing values.
A list of array of imputed covariates (n_imp × n × p) and a matrix of imputed outcomes (n_imp × n).
A list of complete-case covariate matrix and outcomes.
Logical vector of true nonzero coefficient indices.
True covariance matrix used for X.
True coefficient vector.
sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)
Generates binary covariates by thresholding an AR(1) latent Gaussian, then proceeds as in sim_B.
sim_C( n = 100, p = 20, low_missing = TRUE, type = "MAR", SNP = 1.5, corr = 0.5, n_imp = 5, seed = NULL )sim_C( n = 100, p = 20, low_missing = TRUE, type = "MAR", SNP = 1.5, corr = 0.5, n_imp = 5, seed = NULL )
n |
Integer. Number of observations. |
p |
Integer. Number of covariates (columns). Takes values in {20, 40}. |
low_missing |
Logical. If TRUE, use low missingness rates; if FALSE, higher missingness. |
type |
Character. Missingness mechanism: "MCAR" or "MAR". |
SNP |
Numeric. Signal-to-noise ratio controlling error variance. |
corr |
Numeric. AR(1) correlation parameter |
n_imp |
Integer. Number of multiple imputations to generate. |
seed |
Integer or NULL. Random seed for reproducibility. |
A list with components:
A list of complete covariate matrix and outcomes before missingness.
A list of covariate matrix and outcomes with missing values.
A list of array of imputed covariates (n_imp × n × p) and a matrix of imputed outcomes (n_imp × n).
A list of complete-case covariate matrix and outcomes.
Logical vector of true nonzero coefficient indices.
True covariance matrix used for X.
True coefficient vector.
sim <- sim_C(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)sim <- sim_C(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) str(sim)
Implements Bayesian variable selection using a spike-and-slab prior with a Laplace (double-exponential) slab
on nonzero coefficients. Latent inclusion indicators gamma follow Bernoulli(theta), and their probabilities
follow independent Beta(a, b) priors.
spike_laplace_partially_mcmc( X, Y, intercept = TRUE, a = 2, b = NULL, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )spike_laplace_partially_mcmc( X, Y, intercept = TRUE, a = 2, b = NULL, nburn = 4000, npost = 4000, seed = NULL, verbose = TRUE, printevery = 1000, chain_index = 1 )
X |
A 3-D array of predictors with dimensions |
Y |
A matrix of outcomes with dimensions |
intercept |
Logical; include an intercept term? Default |
a |
Numeric; shape parameter of the Gamma prior. Default |
b |
Numeric or |
nburn |
Integer; number of burn-in MCMC iterations. Default |
npost |
Integer; number of post-burn-in samples to retain. Default |
seed |
Integer or |
verbose |
Logical; print progress messages? Default |
printevery |
Integer; print progress every this many iterations. Default |
chain_index |
Integer; index of this MCMC chain (for labeling messages). Default |
A named list with components:
post_rhoNumeric vector length npost, sampled global scale .
post_gammaMatrix npost * p of sampled inclusion indicators.
post_thetaMatrix npost * p of sampled Beta parameters .
post_alphaMatrix npost * D of sampled intercepts (if used).
post_lambda2Matrix npost * p of sampled local scale parameters .
post_sigma2Numeric vector length npost, sampled residual variances.
post_betaArray npost * D * p of sampled regression coefficients.
post_fitted_YArray npost * D * n of posterior predictive draws (including noise).
post_pool_betaMatrix (npost * D) * p of pooled coefficient draws.
post_pool_fitted_YMatrix (npost * D) * n of pooled predictive draws (with noise).
hat_matrix_projMatrix D * n * n of averaged projection hat-matrices. To avoid recalculate for estimating degree of freedom.
a, b
Numeric values of the rho hyperparameters used.
sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- spike_laplace_partially_mcmc(X, Y, nburn = 10, npost = 10)sim <- sim_B(n = 100, p = 20, type = "MAR", SNP = 1.5, corr = 0.5, low_missing = TRUE, n_imp = 5, seed = 123) X <- sim$data_MI$X Y <- sim$data_MI$Y fit <- spike_laplace_partially_mcmc(X, Y, nburn = 10, npost = 10)