Compute Monte Carlo estimates of credible intervals for coefficients in the fitted variable selection model. This function is used by summary.varbvs to generate credible intervals for coefficients of top-ranked variables.
varbvscoefcred (fit, vars, cred.int = 0.95, nr = 1000)
Output of function
Vector of indices or names of variables. If not specified, credible intervals are computed for all variables.
Size of credible interval (number between 0 and 1).
Number of Monte Carlo samples to draw to estimate credible intervals. Amore accurate estimate of the credible interval can be obtained by setting nr to a larger number, at the cost of increased computation time.
Here, the credible interval [a,b] is simply defined as
quantile(x,0.5 - cred.int/2) and
b = quantile(x,0.5 +
cred.int/2), in which
x is a vector of samples drawn from the
Credible interval lower bounds.
Credible interval upper bounds.
P. Carbonetto and M. Stephens (2012). Scalable variational inference for Bayesian variable selection in regression, and its accuracy in genetic association studies. Bayesian Analysis 7, 73--108.