selection: Variable selection for a mixedBayes object

View source: R/selection.R

selectionR Documentation

Variable selection for a mixedBayes object

Description

Variable selection for a mixedBayes object

Usage

selection(obj, sparse)

Arguments

obj

mixedBayes object.

sparse

logical flag. If TRUE, spike-and-slab priors will be used to shrink coefficients of irrelevant covariates to zero exactly..

Details

If sparse, the median probability model (MPM) (Barbieri and Berger, 2004) is used to identify predictors that are significantly associated with the response variable. Otherwise, variable selection is based on 95% credible interval. Please check the references for more details about the variable selection.

Value

an object of class ‘selection’ is returned, which is a list with component:

inde

a vector of indicators of selected effects.

References

Ren, J., Zhou, F., Li, X., Ma, S., Jiang, Y. and Wu, C. (2023). Robust Bayesian variable selection for gene-environment interactions. Biometrics,79(2),684-694 \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/biom.13670")}

Barbieri, M.M. and Berger, J.O. (2004). Optimal predictive model selection. Ann. Statist, 32(3):870–897

See Also

mixedBayes

Examples

data(data)
## sparse
fit = mixedBayes(y,e,X,g,w,k,structure=c("bi-level"))
selected=selection(fit,sparse=TRUE)
selected


## non-sparse
fit = mixedBayes(y,e,X,g,w,k,sparse=FALSE,structure=c("bi-level"))
selected=selection(fit,sparse=FALSE)
selected



mixedBayes documentation built on June 8, 2025, 11:04 a.m.