bits {bravo} | R Documentation |
Perform Bayesian iterated screening in Gaussian regression models
bits(X, y, lam = 1, w = 0.5, pp = FALSE, max.var = nrow(X))
X |
An |
y |
The response vector of length |
lam |
The slab precision parameter. Default: |
w |
The prior inclusion probability of each variable. Default: |
pp |
Boolean: If |
max.var |
The maximum number of variables to be included. |
A list with components
model.pp |
An integer vector of the screened model. |
postprobs |
The sequence of posterior probabilities until the last included variable. |
lam |
The value of lam, the slab precision parameter. |
w |
The value of w, the prior inclusion probability. |
Wang, R., Dutta, S., Roy, V. (2021) Bayesian iterative screening in ultra-high dimensional settings. https://arxiv.org/abs/2107.10175
n=50; p=100;
TrueBeta <- c(rep(5,3),rep(0,p-3))
rho <- 0.6
x1 <- matrix(rnorm(n*p), n, p)
X <- sqrt(1-rho)*x1 + sqrt(rho)*rnorm(n)
y <- 0.5 + X %*% TrueBeta + rnorm(n)
res<-bits(X,y, pp=TRUE)
res$model.pp # the vector of screened model
res$postprobs # the log (unnormalized) posterior probabilities corresponding to the model.pp.