BVSelection {spinBayes} | R Documentation |
Variable selection for a BVCfit object
Description
Variable selection for a BVCfit object
Usage
BVSelection(obj, ...)
## S3 method for class 'BVCNonSparse'
BVSelection(obj, burn.in = obj$burn.in, prob = 0.95, ...)
## S3 method for class 'BVCSparse'
BVSelection(obj, burn.in = obj$burn.in, ...)
Arguments
obj |
BVCfit object. |
... |
other BVSelection arguments |
burn.in |
MCMC burn-in. |
prob |
probability for credible interval, between 0 and 1. e.g. prob=0.95 leads to 95% credible interval |
Details
For class 'BVCSparse', the median probability model (MPM) (Barbieri and Berger 2004) is used to identify predictors that are significantly associated with the response variable. For class 'BVCNonSparse', variable selection is based on 95% credible interval. Please check the references for more details about the variable selection.
Value
an object of class "BVSelection" is returned, which is a list with components:
method: method used for identifying important effects
indices: a list of indices and names of selected variables
summary: a summary of selected variables
References
Ren, J., Zhou, F., Li, X., Chen, Q., Zhang, H., Ma, S., Jiang, Y., Wu, C. (2020) Semiparametric Bayesian variable selection for gene-environment interactions. Statistics in Medicine, 39(5): 617– 638 doi:10.1002/sim.8434
Barbieri, M.M. and Berger, J.O. (2004). Optimal predictive model selection Ann. Statist, 32(3):870–897
See Also
Examples
data(gExp)
## sparse
spbayes=BVCfit(X, Y, Z, E, clin)
spbayes
selected = BVSelection(spbayes)
selected$indices
## non-sparse
spbayes=BVCfit(X, Y, Z, E, clin, sparse=FALSE)
spbayes
selected = BVSelection(spbayes)
selected