confint.coef.bas | R Documentation |
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 ~~
## S3 method for class 'coef.bas'
confint(object, parm, level = 0.95, nsim = 10000, ...)
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 |
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).
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.
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.bas()
,
predict.basglm()
,
summary.bas()
,
update.bas()
,
variable.names.pred.bas()
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.