Learn R Programming

ArchaeoPhases (version 1.1)

MultiPhasesGap: Gap/Hiatus between a succession of groups (for groups in temporal order constraint)

Description

This function finds, if it exists, the gap between two successive groups. This gap or hiatus is the longest interval [IntervalInf, IntervalSup] that satisfies : P(Phase1Max < IntervalInf < IntervalSup < Phase2Min | M) = level for each successive group.

Usage

MultiPhasesGap(data, position_minimum, position_maximum = position_minimum+1,
 level = 0.95)

Arguments

data

dataframe containing the output of the MCMC algorithm. The MCMC samples should be in calendar year (BC/AD).

position_minimum

numeric vector containing the column number corresponding to the minimum of the dates included in each group

position_maximum

numeric vector containing the column number corresponding to the maximum of the dates included in each group. By default, position_maximum = position_minimum + 1.

level

probability corresponding to the level of confidence

Value

Returns a matrix of values containing the level of confidence and the endpoints of the gap for each pair of successive groups. The result is given in calendar year (in format BC/AD).

Details

For each i, MultiPhasesGap computes the gap interval for the phase defined by its minimum position_minimum[i] and its maximum position_maximum[i]. The default value of position_maximum corresponds to CSV files exported from ChronoModel software.

Examples

Run this code
  # Data extracted from ChronoModel software
  data(Phases)
  
  # List of the name of the groups 
  names(Phases)
  
  # Stipulating position_maximum
  MultiPhasesGap(Phases, position_minimum = c(4,2), position_maximum = c(5,3))
  
  # In this case, equivalent to 
  MultiPhasesGap(Phases, position_minimum = c(4,2))

Run the code above in your browser using DataLab