multi_credible_interval {ArchaeoPhases}R Documentation

Bayesian credible interval for a series of dates

Description

Estimate the shortest credible interval for each of several MCMC chains.

Usage

multi_credible_interval(data, position, level = 0.95, round_to = 0)

Arguments

data

data frame containing the output of the MCMC algorithm.

position

Numeric vector containing the position of the column corresponding to the MCMC chains of interest, or a list of column names.

level

Probability corresponding to the level of confidence used for the credible interval.

round_to

Integer indicating the number of decimal places.

Details

A (100 * level)\ that keeps N * (1 -level) elements of the sample outside the interval. The (100*level)\

Value

Returns a list with the following components:

ci

A data frame with a row for each column in data and two columns: inf, the lower credible interval in calendar years (BC/AD); and sup, the upper credible interval in calendar years (BC/AD).

level

Probability corresponding to the level of confidence used for the credible interval.

call

The function call.

Author(s)

Anne Philippe, Anne.Philippe@univ-nantes.fr,

Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr, and

Thomas S. Dye, tsd@tsdye.online.

Examples

  data(Events)
  multi_credible_interval(Events, c(2, 4, 3), 0.95)
  # round to decade
  multi_credible_interval(Events, c(2, 4, 3), 0.95, -1)


[Package ArchaeoPhases version 1.5 Index]