confint.coef.bas {BAS} R Documentation

## Compute Credible Intervals for BAS regression coefficients from BAS objects

### Description

Uses Monte Carlo simulations using posterior means and standard deviations of coefficients 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$. than the description above ~~

### Usage

## S3 method for class 'coef.bas'
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 probability 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 labeled as 1-level)/2 and 1 - (1-level)/2 in percent (by default 2.5 and 97.5).

### Note

For mixture of g-priors these are approximate. This uses Monte Carlo sampling so results may be subject to Monte Carlo variation and larger values of nsim may be needed to reduce variability.

### Author(s)

Merlise A Clyde

Other CI methods: confint.pred.bas(), plot.confint.bas()

Other bas methods: BAS, bas.lm(), coef.bas(), confint.pred.bas(), diagnostics(), fitted.bas(), force.heredity.bas(), image.bas(), plot.confint.bas(), predict.basglm(), predict.bas(), summary.bas(), update.bas(), variable.names.pred.bas()

### Examples



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)
# extract just the coefficient of X4
confint(coef_hald, parm="X4")



[Package BAS version 1.7.1 Index]