Learn R Programming

BAS (version 1.4.5)

plot.confint.bas: Plot Bayesian Confidence Intervals

Description

Function takes the the output of functions that return credible intervals from BAS objects, and creates a plot of the posterior mean with segments representing the credible interval.

Usage

# S3 plotting method for objects of class 'confint.bas'
# S3 method for confint.bas
plot(x, horizontal=FALSE, ...)

Arguments

x
the output from confint.coef.bas or confint.pred.bas containing credible intervals and estimates.
horizontal
orientation of the plot
...
optional graphical arguments to pass on to plot

Value

A plot of the credible intervals.

Details

This function takes the HPD intervals or credible intervals created by confint.coef.bas or confint.pred.bas from BAS objects, and creates a plot of the posterior mean with segments representing the credible interval. BAS tries to return HPD intervals, and under model averaging these may not be symmetric.

See Also

confint.coef.bas, confint.pred.bas, coef.bas, predict.bas, link{bas.lm}

Examples

Run this code
data(Hald)
hald.ZS = bas.lm(Y ~ ., data=Hald, prior="ZS-null", modelprior=uniform())
plot(confint(coef(hald.ZS),parm=2:5))
plot(confint(predict(hald.ZS, se.fit=TRUE), parm="mean"))

Run the code above in your browser using DataLab