BCI: Bayesian Credible Interval

Description Usage Arguments Value Author(s) References See Also Examples

Description

Calculate the Bayesian Credible Intervals for an mcmcMH object.

Usage

1
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.

Author(s)

Corey Chivers <corey.chivers@mail.mcgill.ca>

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

1
2
data(mcmc_r)
BCI(mcmc_r) ## 95% BCIs of a simple Bayesian linear regression

Example output

Loading required package: MASS
             0.025    0.975   post_mean
a       -6.6113522 7.038858 0.001852978
b        0.2217377 1.543519 0.902057671
epsilon  3.8094802 6.550360 4.957292114

MHadaptive documentation built on May 1, 2019, 10:31 p.m.