phase_statistics: Summary statistics of a phase

View source: R/PhaseStatistics.R

phase_statisticsR Documentation

Summary statistics of a phase

Description

Estimation of summary statistics for the beginning, end, and duration of a phase.

Usage

phase_statistics(min_chain, max_chain, level = 0.95, round_to = 0)

Arguments

min_chain

Numeric vector containing the output of the MCMC algorithm for the start of the phase.

max_chain

Numeric vector containing the output of the MCMC algorithm for the end of the phase.

level

Probability corresponding to the level of confidence used for the credible interval and the highest density region.

round_to

Integer indicating the number of decimal places.

Details

The summary statistics are those given by the MarginalStatistics() function. The time range is given by PhaseTimeRange() function. The duration is computed as follows: duration = maximum - minimum at each iteration of the MCMC output.

Value

A list with the following components:

statistics

A data frame where the rows correspond to the summary statistics and the columns include: start, the start of the phase in calendar years (BC/AD); end the end of the phase in calendar years (BC/AD); and duration the duration of the phase in years.

level

Probability corresponding to the level of confidence used for the credible interval and the highest density region.

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(Phases); attach(Phases)
  phase_statistics(Phase.1.alpha, Phase.1.beta, 0.95)
  phase_statistics(Phase.2.alpha, Phase.2.beta, 0.95)
  ## round to decade
  phase_statistics(Phase.2.alpha, Phase.2.beta, 0.95, -1)


ArchaeoPhases documentation built on June 22, 2022, 1:05 a.m.