Learn R Programming

ArchaeoPhases (version 1.8)

dates_hiatus: Test for the existence of a hiatus between two MCMC chains.

Description

Determines whether there is a hiatus between two MCMC chains and returns the longest interval that satisfies: \(P(a_chain < IntervalInf < IntervalSup < b_chain | M) = level\)

Usage

dates_hiatus(a_chain, b_chain, level = 0.95)

Arguments

a_chain

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

b_chain

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

level

Probability corresponding to the confidence level of the interval.

Value

A list with the following components:

hiatus

A named vector where inf is the lower endpoint of the hiatus as a calendar year (AD/BC) or NA if there is no hiatus at level, and sup is the upper endpoint of the gap as a calendar year (AD/BC), or NA if there is no hiatus at level.

duration

The duration of the hiatus at level.

level

Probability corresponding to the confidence level of the interval.

call

The function call.

Examples

Run this code
# NOT RUN {
  data(Events); attach(Events)
  dates_hiatus(Event.1, Event.12)
  dates_hiatus(Event.1, Event.12, level = 0.5)

# }

Run the code above in your browser using DataLab