Learn R Programming

ArchaeoPhases (version 1.8)

CredibleInterval: Bayesian credible interval

Description

Computes the shortest credible interval of the output of the MCMC algorithm for a single parameter

Usage

CredibleInterval(a_chain, level = 0.95, roundingOfValue = 0)

Arguments

a_chain

Numeric vector containing the output of the MCMC algorithm for the parameter.

level

Probability corresponding to the level of confidence used for the credible interval, default = 0.95.

roundingOfValue

Integer indicating the number of decimal places to be used, default = 0.

Value

A named vector of values containing the confidence level and the endpoints of the shortest credible interval in calendar years (BC/AD).

Details

A \((100 * level)\)\ elements of the sample outside the interval. The \((100 * level)\)\

Examples

Run this code
# NOT RUN {
  data(Events); attach(Events)
  CredibleInterval(Event.1)
  CredibleInterval(Event.12, 0.50)

# }

Run the code above in your browser using DataLab