BAS (version 1.5.5)

confint.pred.bas: Compute Credible (Bayesian Confidence) Intervals for a BAS predict object

Description

Compute credible intervals for in-sample or out of sample prediction or for the regression function

Usage

# S3 method for pred.bas
confint(object, parm, level = 0.95, nsim = 10000, ...)

Arguments

object

an object created by predict.bas

parm

character variable, "mean" or "pred". If missing parm='pred'.

level

the nominal level of the (point-wise) credible interval

nsim

number of Monte Carlo simulations for sampling methods with BMA

...

optional arguments to pass on to next function call; none at this time.

Value

a matrix with lower and upper level * 100 percent credible intervals for either the mean of the regression function or predicted values.

Details

This constructs approximate 95 percent Highest Posterior Density intervals for 'pred.bas' objects. If the estimator is based on model selection, the intervals use a Student t distribution using the estimate of g. If the estimator is based on BMA, then nsim draws from the mixture of Student t distributions are obtained with the HPD interval obtained from the Monte Carlo draws.

See Also

predict.bas

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

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

Examples

Run this code
# NOT RUN {
data("Hald")
hald.gprior =  bas.lm(Y~ ., data=Hald, alpha=13, prior="g-prior")
hald.pred = predict(hald.gprior, estimator="BPM", predict=FALSE, se.fit=TRUE)
confint(hald.pred, parm="mean")
confint(hald.pred)  #default
hald.pred = predict(hald.gprior, estimator="BMA", predict=FALSE, se.fit=TRUE)
confint(hald.pred)


# }

Run the code above in your browser using DataLab