Learn R Programming

MHadaptive (version 1.1-8)

BCI: Bayesian Credible Interval

Description

Calculate the Bayesian Credible Intervals for an mcmcMH object.

Usage

BCI(mcmc_object, interval = c(0.025, 0.975))

Arguments

mcmc_object
object returned by a call to Metro_Hastings()
interval
vector containing the percentiles over which to calculate the credible interval. The default of c(0.025,0.975) corresponds to a 95% BCI.

Value

matrix of BCI values. Each row contains the marginal BCI for each parameter, as well as the marginal posterior means. Columns correspond to the percentiles given by interval.

References

Spiegelhalter, D. J., Best, N. G., Carlin, B. P. and Van Der Linde, A. (2002), Bayesian measures of model complexity and fit. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 64: 583-639. doi: 10.1111/1467-9868.00353

See Also

Metro_Hastings,mcmc_thin, plotMH

Examples

Run this code
data(mcmc_r)
BCI(mcmc_r) ## 95% BCIs of a simple Bayesian linear regression

Run the code above in your browser using DataLab