Learn R Programming

BAS (version 1.3.0)

confint.coef.bas: Credible Intervals for BMA coefficients

Description

Computes Credible Intervals for regression coefficients from BAS objects

Usage

"confint"(object, parm, level = 0.95, nsim=10000, ...)

Arguments

object
a coef.bas object
parm
a specification of which parameters are to be given credible intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered.
level
the probabilty coverage required
nsim
number of Monte Carlo draws from the posterior distribution. Used when number of models is greater than 1.
...
other arguments to passed; none currently

Value

A matrix (or vector) with columns giving lower and upper HPD credible limits for each parameter. These will be labelled as 1-level)/2 and 1 - (1-level)/2 in percent (by default 2.5 and 97.5).

Details

Uses Monte Carlo simulations using posterior means and standard deviations of coefficents to generate draws from the posterior distributions and returns highest posterior density (HPD) credible intervals. If the number of models equals one, then use the t distribution to find intervals. These currently condition on the estimate of $g$.

Examples

Run this code

data("Hald")
hald.gprior =  bas.lm(Y~ ., data=Hald, alpha=13, prior="g-prior")
coef.hald = coef(hald.gprior)
confint(coef.hald)
confint(coef.hald, approx=FALSE, nsim=5000)

Run the code above in your browser using DataLab