multi_credible_interval {ArchaeoPhases} | R Documentation |
Estimate the shortest credible interval for each of several MCMC chains.
multi_credible_interval(data, position, level = 0.95, round_to = 0)
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. |
A (100 * level)
\
that keeps N * (1 -level)
elements of the sample outside the interval.
The (100*level)
\
Returns a list with the following components:
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).
Probability corresponding to the level of confidence used for the credible interval.
The function call.
Anne Philippe, Anne.Philippe@univ-nantes.fr,
Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr, and
Thomas S. Dye, tsd@tsdye.online.
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)