Learn R Programming

RChronoModel (version 0.1)

PhaseStatistics: Summary statistics for a phase

Description

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

Usage

PhaseStatistics(PhaseBeginning_chain, PhaseEnd_chain, level = 0.95,
  max_decimal = 0)

Arguments

PhaseBeginning_chain
numeric vector containing the output of the MCMC algorithm for the beginning of the phase
PhaseEnd_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
max_decimal
maximum number of decimal

Value

  • Returns a list of values corresponding to the summary statistics:
  • 1Statistics of the beginning of the phase
  • 2Statistics of the end of the phase
  • 3Statistics of the duration of the phase
  • 4The endpoints of the phase time range

Details

The summary statistics are those given by MarginalStatistics function. The time range is given by PhaseTimeRange function. The duration of the phase is computed as follow duration = end - beginning at each iteration of the MCMC output.

Examples

Run this code
data(Phases); attach(Phases)
  PhaseStatistics(Phase.1.alpha, Phase.1.beta, 0.95, 0)
  PhaseStatistics(Phase.2.alpha, Phase.2.beta, 0.95, 0)

Run the code above in your browser using DataLab