Title: | Post-Processing of the Markov Chain Simulated by ChronoModel or Oxcal |
---|---|
Description: | Provides a list of functions for the statistical analysis and the post-processing of the Markov Chains simulated by ChronoModel (see <http://www.chronomodel.fr> for more information). ChronoModel is a friendly software to construct a chronological model in a Bayesian framework. Its output is a sampled Markov chain from the posterior distribution of dates component the chronology. The functions can also be applied to the analyse of mcmc output generated by Oxcal software. |
Authors: | Anne Philippe and Marie-Anne Vibet |
Maintainer: | Anne Philippe <[email protected]> |
License: | GPL |
Version: | 0.4 |
Built: | 2024-12-14 05:06:10 UTC |
Source: | https://github.com/cran/RChronoModel |
Constructs a dataframe containing the output of the MCMC algorithm corresponding to the minimum and the maximum of a group of dates (phase)
CreateMinMaxGroup(data, position, name ="Phase", add=NULL, exportFile=NULL)
CreateMinMaxGroup(data, position, name ="Phase", add=NULL, exportFile=NULL)
data |
dataframe containing the output of the MCMC algorithm |
position |
numeric vector containing the position of the column corresponding to the MCMC chains of all dates included in the phase of interest |
name |
name of the current group of dates or phase |
add |
the name of the dataframe in which the current minimum and maximum should be added. Null by default. |
exportFile |
the name of the final file that will be saved if chosen. Null by default. |
A dataframe containing the minimum and the maximum of the group of dates included in the phase of interest. These values may be added to an already existing file "add" if given.
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events) Temp = CreateMinMaxGroup(Events, c(2,4), "Phase2") Temp = CreateMinMaxGroup(Events, c(3,5), "Phase1", Temp)
data(Events) Temp = CreateMinMaxGroup(Events, c(2,4), "Phase2") Temp = CreateMinMaxGroup(Events, c(3,5), "Phase1", Temp)
Computes the shortest credible interval at the desired level.
CredibleInterval(a_chain, level = 0.95)
CredibleInterval(a_chain, level = 0.95)
a_chain |
numeric vector containing the output of the MCMC algorithm for a one-parameter |
level |
probability corresponding to the level of confidence used for the credible interval |
A (100 * level) % credible intervalgives the shortest interval, whose posterior probability is equal to the desired level. This interval is approximated by constructing the shortest interval such that N*(1-level) elements of the sample are outside the interval.
Returns a vector of values containing the level of confidence and the endpoints of the shortest credible interval.
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events); attach(Events) CredibleInterval(Event.1) CredibleInterval(Event.12, 0.50)
data(Events); attach(Events) CredibleInterval(Event.1) CredibleInterval(Event.12, 0.50)
Finds if it exists a gap between two dates that is the longest interval that satisfies : P(a_chain < IntervalInf < IntervalSup < b_chain | M) = level
DatesHiatus(a_chain, b_chain, level=0.95)
DatesHiatus(a_chain, b_chain, level=0.95)
a_chain |
numeric vector containing the output of the MCMC algorithm for the first one-parameter (date) a |
b_chain |
numeric vector containing the output of the same MCMC algorithm for the second one-parameter (date) b |
level |
probability corresponding to the level of confidence used for the credible interval and the highest density region |
Returns the endpoints of the longest hiatus between two parameters
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events); attach(Events) DatesHiatus(Event.1, Event.12) DatesHiatus(Event.1, Event.12, level = 0.5)
data(Events); attach(Events) DatesHiatus(Event.1, Event.12) DatesHiatus(Event.1, Event.12, level = 0.5)
Contains the output of the MCMC algorithm for four events modelled by ChronoModel.
data(Events)
data(Events)
A data frame with 30000 observations on the following 5 variables.
iter
a numeric vector corresponding to iteration number
Event.1
a numeric vector containing the output of the MCMC algorithm for the parameter Event 1
Event.12
a numeric vector containing the output of the MCMC algorithm for the parameter Event 12
Event.2
a numeric vector containing the output of the MCMC algorithm for the parameter Event 2
Event.22
a numeric vector containing the output of the MCMC algorithm for the parameter Event 22
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events) summary(Events)
data(Events) summary(Events)
Use of the read.csv with th default values for CSV files extracted from ChronoModel software
ImportCSV(file, dec = '.', sep=',', comment.char='#', header = TRUE)
ImportCSV(file, dec = '.', sep=',', comment.char='#', header = TRUE)
file |
the name of the CSV file containing the output of the MCMC algorithm |
dec |
the character used in the file for decimal points for the use of read.csv() |
sep |
the field separator character for the use of read.csv() |
comment.char |
a character vector of length one containing a single character or an empty string for the use of read.csv() |
header |
a logical value indicating whether the file contains the names of the variables as its first line. |
Returns a dataframe containing a representation of the data in the file.
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events) write.csv(Events, "data.csv", row.names=FALSE) ImportCSV("data.csv") ImportCSV("data.csv", dec = '.', sep=',', comment.char='#', header = TRUE)
data(Events) write.csv(Events, "data.csv", row.names=FALSE) ImportCSV("data.csv") ImportCSV("data.csv", dec = '.', sep=',', comment.char='#', header = TRUE)
This function draws the density of a one-parameter and adds summary statistics.
MarginalPlot(a_chain, level = 0.95, title = "Marginal posterior density", colors = T, GridLength = 1024)
MarginalPlot(a_chain, level = 0.95, title = "Marginal posterior density", colors = T, GridLength = 1024)
a_chain |
numeric vector containing the output of the MCMC algorithm for a one-parameter |
level |
probability corresponding to the level of confidence |
title |
label of the title |
colors |
if TRUE -> use of colors in the graph |
GridLength |
length of the grid used to estimate the density |
The density is estimated using density() function with n=GridLength.
Draws a plot of the estimated marginal posterior density for the one-parameter and adds the mean and the credible interval at the desired level
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events); attach(Events) MarginalPlot(Event.1, 0.95) MarginalPlot(Event.1, 0.50) MarginalPlot(Event.2, 0.95, title="Marginal density plot of Event 2") MarginalPlot(Event.2, 0.95, colors = FALSE)
data(Events); attach(Events) MarginalPlot(Event.1, 0.95) MarginalPlot(Event.1, 0.50) MarginalPlot(Event.2, 0.95, title="Marginal density plot of Event 2") MarginalPlot(Event.2, 0.95, colors = FALSE)
This function estimates the posterior probability that event 'a' is older than event 'b' using the output of the MCMC algorithm. This provides a bayesian test for checking the following assumption: "Event a is older than event b"
MarginalProba(a_chain, b_chain)
MarginalProba(a_chain, b_chain)
a_chain |
numeric vector containing the output of the MCMC algorithm for the first one-parameter (date) a |
b_chain |
numeric vector containing the output of the same MCMC algorithm for the second one-parameter (date) b |
For a given output of MCMC algorithm, this function estimates the posterior probability of the event 'a' < 'b' by the relative frenquency of the event "the value of event 'a' is lower than the value of event 'b'" in the simulated Makov chain.
Returns the posterior probability of the following assumption: "Event a is older than event b"
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events); attach(Events) # Probability that Event.1 is older than Event.12 MarginalProba(Event.1, Event.12) # Probability that Event.1 is older than Event.2 MarginalProba(Event.1, Event.2) # Probability that the beginning of the phase 1 is older than the end of the phase 1 # Should always be 1 for every phase data(Phases); attach(Phases) MarginalProba(Phase.1.alpha, Phase.1.beta)
data(Events); attach(Events) # Probability that Event.1 is older than Event.12 MarginalProba(Event.1, Event.12) # Probability that Event.1 is older than Event.2 MarginalProba(Event.1, Event.2) # Probability that the beginning of the phase 1 is older than the end of the phase 1 # Should always be 1 for every phase data(Phases); attach(Phases) MarginalProba(Phase.1.alpha, Phase.1.beta)
Gives a list of summary statistics resulting from the output of the MCMC algorithm for a one-parameter.
MarginalStatistics(a_chain, level = 0.95, max_decimal = 0)
MarginalStatistics(a_chain, level = 0.95, max_decimal = 0)
a_chain |
numeric vector containing the output of the MCMC algorithm for a one-parameter |
level |
probability corresponding to the level of confidence used for the credible interval and the highest density region |
max_decimal |
maximum number of decimal |
The 100*level % HPD (highest posterior density) region is estimated using HDR function from Package 'hdrcde'.
A matrix of values corresponding to the following summary statistics
title |
The title of the summary statistics |
mean |
The mean of the MCMC chain. Use of "mean" function. |
map |
The maximum a posteriori of the MCMC chain. Use of "hdr" function. |
sd |
The standard deviation of the MCMC chain. Use of "sd" function. |
Q1 , median , Q3
|
The quantiles of the MCMC chain corresponding to 0.25, 0.50 and 0.75. Use of "quantile" function. |
CI |
The credible interval corresponding to the desired level. Use of "CredibleInterval" function. |
HPDR |
The highest posterior density regions corresponding to the desired level. Use of "hdr" function. |
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
Hyndman, R.J. (1996) Computing and graphing highest density regions. American Statistician, 50, 120-126.
data(Events); attach(Events) MarginalStatistics(Event.1) MarginalStatistics(Event.2, level = 0.90)
data(Events); attach(Events) MarginalStatistics(Event.1) MarginalStatistics(Event.2, level = 0.90)
Estimation of the shorest credible interval for each variables of simulated Markov chain.
MultiCredibleInterval(data, position, level = 0.95)
MultiCredibleInterval(data, position, level = 0.95)
data |
dataframe containing the output of the MCMC algorithm |
position |
numeric vector containing the position of the column corresponding to the MCMC chains of interest |
level |
probability corresponding to the level of confidence used to estimate the credible interval |
Returns a matrix of values containing the level of confidence and the endpoints of the shortest credible interval for each variable of the MCMC chain. The name of the resulting rows are the positions of the corresponding columns in the CSV file.
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events) MultiCredibleInterval(Events, c(2,4,3), 0.95)
data(Events) MultiCredibleInterval(Events, c(2,4,3), 0.95)
Draws a plot of segments corresponding to the endpoints of the intervals (CI or HPD) of each selected date.
MultiDatesPlot(data, position, level = 0.95, intervals = c("CI", "HPD"), title = "Plot of intervals")
MultiDatesPlot(data, position, level = 0.95, intervals = c("CI", "HPD"), title = "Plot of intervals")
data |
dataframe containing the output of the MCMC algorithm |
position |
numeric vector containing the position of the column corresponding to the MCMC chains of interest |
level |
probability corresponding to the level of confidence used to estimate the credible interval |
intervals |
"CI" corresponds to the credible intervals, "HPD" to the highest density regions |
title |
title of the graph |
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Events) MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="CI", title = "Plot of CI intervals") MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="HPD", title = "Plot of HPD intervals")
data(Events) MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="CI", title = "Plot of CI intervals") MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="HPD", title = "Plot of HPD intervals")
Estimation of the highest posterior density regions for each variables of simulated Markov chain. This function uses the "hdr" function oincluded in the package "hdrcde.
MultiHPD(data, position, level=0.95)
MultiHPD(data, position, level=0.95)
data |
dataframe containing the output of the MCMC algorithm |
position |
numeric vector containing the position of the column corresponding to the MCMC chains of interest |
level |
probability corresponding to the level of confidence |
Returns a matrix of values containing the level of confidence and the endpoints of each interval for each variable of the MCMC chain. The name of the resulting rows are the positions of the corresponding columns in the CSV file.
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
Hyndman, R.J. (1996) Computing and graphing highest density regions. American Statistician, 50, 120-126.
data(Events) MultiHPD(Events, c(2,4,3), 0.95)
data(Events) MultiHPD(Events, c(2,4,3), 0.95)
Draws a plot with the marginal posterior densities of the minimum and the maximum of the dates included in each phase. No temporal order between phases is required.
MultiPhasePlot(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, title = "Phases marginal posterior densities")
MultiPhasePlot(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, title = "Phases marginal posterior densities")
data |
dataframe containing the output of the MCMC algorithm |
position_minimum |
numeric vector containing the column number corresponding to the minimum of the dates included in each phase |
position_maximum |
numeric vector containing the column number corresponding to the maximum of the dates included in each phase. By default, position_maximum = position_minimum + 1. |
level |
probability corresponding to the level of confidence |
title |
title of the graph |
Draws a plot with the marginal posterior densities of the minimum and the maximum of the dates included in each phase and adds the time range of each phase.
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhasePlot(Phases, c(4,2), c(5,3), title = "Succession of phase 1 and phase 2") # In this case, equivalent to MultiPhasePlot(Phases, c(4,2), title = "Succession of phase 1 and phase 2")
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhasePlot(Phases, c(4,2), c(5,3), title = "Succession of phase 1 and phase 2") # In this case, equivalent to MultiPhasePlot(Phases, c(4,2), title = "Succession of phase 1 and phase 2")
This function finds, if it exists, the gap between two successive phases. This gap or hiatus is the longest interval [IntervalInf, IntervalSup] that satisfies : P(Phase1Max < IntervalInf < IntervalSup < Phase2Min | M) = level for each successive phase.
MultiPhasesGap(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, max_decimal = 0)
MultiPhasesGap(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, max_decimal = 0)
data |
dataframe containing the output of the MCMC algorithm |
position_minimum |
numeric vector containing the column number corresponding to the minimum of the dates included in each phase |
position_maximum |
numeric vector containing the column number corresponding to the maximum of the dates included in each phase. By default, position_maximum = position_minimum + 1. |
level |
probability corresponding to the level of confidence |
max_decimal |
maximum number of decimal |
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.
Returns a matrix of values containing the level of confidence and the endpoints of the gap for each pair of successive phases
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhasesGap(Phases, c(4,2), c(5,3)) # In this case, equivalent to MultiPhasesGap(Phases, c(4,2))
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhasesGap(Phases, c(4,2), c(5,3)) # In this case, equivalent to MultiPhasesGap(Phases, c(4,2))
Finds if it exists the shortest interval [TransitionRangeInf, TransitionRangeSup] that satisfies : P(TransitionRangeInf < Phase1Max < Phase2Min < TransitionRangeSup | M) = level for each phase
MultiPhasesTransition(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, max_decimal = 0)
MultiPhasesTransition(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, max_decimal = 0)
data |
dataframe containing the output of the MCMC algorithm |
position_minimum |
numeric vector containing the column number corresponding to the minimum of the dates included in each phase |
position_maximum |
numeric vector containing the column number corresponding to the maximum of the dates included in each phase. By default, position_maximum = position_minimum + 1. |
level |
probability corresponding to the level of confidence |
max_decimal |
maximum number of decimal |
For each i, MultiPhasesTransition computes the transition 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.
Returns a matrix of values containing the level of confidence and the endpoints of the transition interval for each pair of successive phases
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhasesTransition(Phases, c(4,2), c(5,3)) # In this case, equivalent to MultiPhasesTransition(Phases, c(4,2))
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhasesTransition(Phases, c(4,2), c(5,3)) # In this case, equivalent to MultiPhasesTransition(Phases, c(4,2))
Computes the shortest interval that satisfies : P(PhaseMin < IntervalInf < IntervalSup < PhaseMax | M) = level
MultiPhaseTimeRange(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, max_decimal = 0)
MultiPhaseTimeRange(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, max_decimal = 0)
data |
dataframe containing the output of the MCMC algorithm |
position_minimum |
numeric vector containing the column number corresponding to the minimum of the dates included in each phase |
position_maximum |
numeric vector containing the column number corresponding to the maximum of the dates included in each phase. By default, position_maximum = position_minimum + 1. |
level |
probability corresponding to the desired level of confidence |
max_decimal |
maximum number of decimal |
For each i, MultiPhaseTimeRange computes the time range 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.
Returns a matrix of values containing the level of confidence and the endpoints of the shortest time range associated with the desired level
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhaseTimeRange(Phases, c(4,2), c(5,3)) # In this case, equivalent to MultiPhaseTimeRange(Phases, c(4,2))
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_maximum MultiPhaseTimeRange(Phases, c(4,2), c(5,3)) # In this case, equivalent to MultiPhaseTimeRange(Phases, c(4,2))
This functions draws a plot of the densities of several successive phases and adds several statistics (mean, CI, HPDR)
MultiSuccessionPlot(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, title = "Characterisation of a succession of phases")
MultiSuccessionPlot(data, position_minimum, position_maximum = position_minimum+1, level = 0.95, title = "Characterisation of a succession of phases")
data |
dataframe containing the output of the MCMC algorithm |
position_minimum |
numeric vector containing the column number corresponding to the minimum of the dates included in each phase |
position_maximum |
numeric vector containing the column number corresponding to the maximum of the dates included in each phase. By default, position_maximum = position_minimum + 1. |
level |
probability corresponding to the level of confidence |
title |
title of the graph |
Curves represent the density of the minimum (oldest dates) and the maximum (youngest dates) of the dates included in each phase. Curves of the same color refer to the same phase. When there is only one curve of one color, it means that there is only one event in the corresponding phase and then the minimum equals the maximum. Time range intervals are symbolised by segments above the curves drawn using the same color as the one of the curves of the associated phase. Transition and gap range intervals are represented by two-coloured segments using the colors of successive phases. If the gap between the successive phases does not exist, a cross is drawn instead of a segment.
Returns a plot of all densities and adds several summary statistics
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_end MultiSuccessionPlot(Phases, c(4,2), c(5,3), title = "Succession of phase 1 and phase 2") # In this case, equivalent to MultiSuccessionPlot(Phases, c(4,2), title = "Succession of phase 1 and phase 2")
# Data extracted from ChronoModel software data(Phases) # List of the name of the phases names(Phases) # Stipulating position_end MultiSuccessionPlot(Phases, c(4,2), c(5,3), title = "Succession of phase 1 and phase 2") # In this case, equivalent to MultiSuccessionPlot(Phases, c(4,2), title = "Succession of phase 1 and phase 2")
This function draws the marginal posterior densities of the time elapsed between the minimum and the maximum of the dates included in a phase, and adds summary statistics (mean, CI)
PhaseDurationPlot(PhaseMin_chain, PhaseMax_chain, level=0.95, title = "Duration of the phase", colors = T, GridLength=1024)
PhaseDurationPlot(PhaseMin_chain, PhaseMax_chain, level=0.95, title = "Duration of the phase", colors = T, GridLength=1024)
PhaseMin_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the phase |
PhaseMax_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the phase |
level |
probability corresponding to the level of confidence used for the credible interval and the time range |
title |
title of the graph |
colors |
if TRUE -> use of colors in the graph |
GridLength |
length of the grid used to estimate the density |
A plot with the marginal posterior densities of the duration of a phase and adds several summary statistics (mean, Credible interval, Time range)
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases); attach(Phases) PhaseDurationPlot(Phase.1.alpha, Phase.1.beta, 0.95, "Duration of Phase 1") PhaseDurationPlot(Phase.2.alpha, Phase.2.beta, 0.95, "Duration of Phase 2",colors = FALSE)
data(Phases); attach(Phases) PhaseDurationPlot(Phase.1.alpha, Phase.1.beta, 0.95, "Duration of Phase 1") PhaseDurationPlot(Phase.2.alpha, Phase.2.beta, 0.95, "Duration of Phase 2",colors = FALSE)
This function draws the marginal posterior densities of the minimum and the maximum of the dates included in the phase
PhasePlot(PhaseMin_chain, PhaseMax_chain, level = 0.95, title = "Characterisation of a phase", colors = T, GridLength = 1024)
PhasePlot(PhaseMin_chain, PhaseMax_chain, level = 0.95, title = "Characterisation of a phase", colors = T, GridLength = 1024)
PhaseMin_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the phase |
PhaseMax_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the phase |
level |
probability corresponding to the level of confidence used for the credible interval and the time range |
title |
title of the graph |
colors |
if TRUE -> use of colors in the graph |
GridLength |
length of the grid used to estimate the density |
A plot with the marginal posterior densities of the minimum and the maximum of the dates included in the phase and adds several summary statistics (mean, Credible interval, Time range)
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases); attach(Phases) PhasePlot(Phase.1.alpha, Phase.1.beta, 0.95, "Densities of Phase 1") PhasePlot(Phase.2.alpha, Phase.2.beta, 0.95, "Densities of Phase 2",colors = FALSE)
data(Phases); attach(Phases) PhasePlot(Phase.1.alpha, Phase.1.beta, 0.95, "Densities of Phase 1") PhasePlot(Phase.2.alpha, Phase.2.beta, 0.95, "Densities of Phase 2",colors = FALSE)
Contains the output of the MCMC algorithm for all the phases (beginning and end) of two successive phases modelled in ChronoModel. Phase 1 is assued to be older than Phase 2.
data(Phases)
data(Phases)
A data frame with 30000 observations on the following 5 variables.
iter
a numeric vector corresponding to iteration number
Phase.1.alpha
a numeric vector containing the output of the MCMC algorithm for the beginning of the phase "Phase 1"
Phase.1.beta
a numeric vector containing the output of the MCMC algorithm for the end of the phase "Phase 1"
Phase.2.alpha
a numeric vector containing the output of the MCMC algorithm for the the beginning of the phase "Phase 2"
Phase.2.beta
a numeric vector containing the output of the MCMC algorithm for the end of the phase "Phase 2"
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases) attach(Phases) PhasePlot(Phase.1.alpha, Phase.1.beta) PhaseTimeRange(Phase.1.alpha, Phase.1.beta) PhasesGap(Phase.1.beta, Phase.2.alpha) PhasesTransition(Phase.1.beta, Phase.2.alpha)
data(Phases) attach(Phases) PhasePlot(Phase.1.alpha, Phase.1.beta) PhaseTimeRange(Phase.1.alpha, Phase.1.beta) PhasesGap(Phase.1.beta, Phase.2.alpha) PhasesTransition(Phase.1.beta, Phase.2.alpha)
This function finds, if it exists, the gap between two successive phases. This gap or hiatus is the longest interval [IntervalInf ; IntervalSup] that satisfies : P(Phase1Max_chain < IntervalInf < IntervalSup < Phase2Min_chain | M) = level.
PhasesGap(Phase1Max_chain, Phase2Min_chain, level = 0.95, max_decimal = 0)
PhasesGap(Phase1Max_chain, Phase2Min_chain, level = 0.95, max_decimal = 0)
Phase1Max_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the oldest phase |
Phase2Min_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the youngest phase |
level |
probability corresponding to the level of confidence |
max_decimal |
maximum number of decimal |
Returns a vector of values containing the level of confidence and the endpoints of the gap between the successive phases
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases); attach(Phases) PhasesGap(Phase.1.beta, Phase.2.alpha, 0.95) PhasesGap(Phase.1.beta, Phase.2.alpha, 0.50)
data(Phases); attach(Phases) PhasesGap(Phase.1.beta, Phase.2.alpha, 0.95) PhasesGap(Phase.1.beta, Phase.2.alpha, 0.50)
Estimation of several summary statistics of the minimum, the maximum and the duration of the dates included in the phase.
PhaseStatistics(PhaseMin_chain, PhaseMax_chain, level = 0.95, max_decimal = 0)
PhaseStatistics(PhaseMin_chain, PhaseMax_chain, level = 0.95, max_decimal = 0)
PhaseMin_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the phase |
PhaseMax_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in 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 |
The summary statistics are those given by MarginalStatistics function. The time range is given by PhaseTimeRange function. The duration is computed as follow duration = maximum - minimum at each iteration of the MCMC output.
Returns a list of values corresponding to the summary statistics:
1 |
Statistics of the minimum of the dates included in the phase |
2 |
Statistics of the maximum of the dates included in the phase |
3 |
Statistics of the duration of the dates included in the phase |
4 |
The endpoints of the phase time range |
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases); attach(Phases) PhaseStatistics(Phase.1.alpha, Phase.1.beta, 0.95, 0) PhaseStatistics(Phase.2.alpha, Phase.2.beta, 0.95, 0)
data(Phases); attach(Phases) PhaseStatistics(Phase.1.alpha, Phase.1.beta, 0.95, 0) PhaseStatistics(Phase.2.alpha, Phase.2.beta, 0.95, 0)
Finds if it exists the shortest interval [TransitionRangeInf , TransitionRangeSup ] that satisfies : P(TransitionRangeInf < Phase1Max_chain < Phase2Min_chain < TransitionRangeSup | M) = level
PhasesTransition(Phase1Max_chain, Phase2Min_chain, level = 0.95, max_decimal = 0)
PhasesTransition(Phase1Max_chain, Phase2Min_chain, level = 0.95, max_decimal = 0)
Phase1Max_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the oldest phase |
Phase2Min_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the youngest phase |
level |
probability corresponding to the level of confidence |
max_decimal |
maximum number of decimal |
Returns a vector of values containing the level of confidence and the endpoints of the transition interval between the successive phases
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases); attach(Phases) PhasesTransition(Phase.1.beta, Phase.2.alpha, 0.95) PhasesTransition(Phase.1.beta, Phase.2.alpha, 0.50)
data(Phases); attach(Phases) PhasesTransition(Phase.1.beta, Phase.2.alpha, 0.95) PhasesTransition(Phase.1.beta, Phase.2.alpha, 0.50)
Computes the shortest interval [IntervalInf ; IntervalSup ] that satisfies : P(PhaseMin_chain =< IntervalInf < IntervalSup =< PhaseMax_chain | M) = level.
PhaseTimeRange(PhaseMin_chain, PhaseMax_chain, level = 0.95, max_decimal = 2)
PhaseTimeRange(PhaseMin_chain, PhaseMax_chain, level = 0.95, max_decimal = 2)
PhaseMin_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the phase |
PhaseMax_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the phase |
level |
probability corresponding to the desired level of confidence |
max_decimal |
maximum number of decimal |
A vector of values containing the desired level of confidence and the endpoints of the shortest time range associated with this desired level.
data(Phases); attach(Phases) PhaseTimeRange(Phase.1.alpha, Phase.1.beta, 0.95) PhaseTimeRange(Phase.2.alpha, Phase.2.beta, 0.95, 0)
data(Phases); attach(Phases) PhaseTimeRange(Phase.1.alpha, Phase.1.beta, 0.95) PhaseTimeRange(Phase.2.alpha, Phase.2.beta, 0.95, 0)
Plot of the densities of the minimum and the maximum of the dates included in each phase and adds several summary statistics (mean, CI, HPDR)
SuccessionPlot(Phase1Min_chain, Phase1Max_chain, Phase2Min_chain, Phase2Max_chain, level = 0.95, title = "Characterisation of several phases", GridLength = 1024)
SuccessionPlot(Phase1Min_chain, Phase1Max_chain, Phase2Min_chain, Phase2Max_chain, level = 0.95, title = "Characterisation of several phases", GridLength = 1024)
Phase1Min_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the oldest phase |
Phase1Max_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the oldest phase |
Phase2Min_chain |
numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the youngest phase |
Phase2Max_chain |
numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the youngest phase |
level |
probability corresponding to the level of confidence |
title |
title of the graph |
GridLength |
length of the grid used to estimate the density |
Curves represent the density of the minimum (oldest dates) and the maximum (youngest dates) of the dates included in each phase. Curves of the same color refer to the same phase. Time range intervals are symbolised by segments above the curves drawn using the same color as the one of the curves of the associated phase. Transition and gap range intervals are represented by two-coloured segments using the colors of the both phases in succession. If the gap between the successive phases does not exist, a cross is drawn instead of a segment.
Plot of the densities of the minimum and the maximum of the dates included in each phase
Anne Philippe <[email protected]> and
Marie-Anne Vibet <[email protected]>
data(Phases); attach(Phases) SuccessionPlot(Phase.1.alpha, Phase.1.beta, Phase.2.alpha, Phase.2.beta, 0.95)
data(Phases); attach(Phases) SuccessionPlot(Phase.1.alpha, Phase.1.beta, Phase.2.alpha, Phase.2.beta, 0.95)
A statistical graphic designed for the archaeological study of rhythms of the long term that embodies a theory of archaeological evidence for the occurrence of events.
TempoActivityPlot(data, position, level=0.95, count = TRUE, title = "Activity plot")
TempoActivityPlot(data, position, level=0.95, count = TRUE, title = "Activity plot")
data |
dataframe containing the output of the MCMC algorithm |
position |
numeric vector containing the position of the column corresponding to the MCMC chains of interest |
level |
probability corresponding to the level of confidence used for the credible interval |
count |
if TRUE the counting process is given as a number, otherwise it is a probability |
title |
title of the graph |
It calculates the cumulative frequency of specified events by calculating how many events took place before each date in a specified range of dates.
Anne Philippe <[email protected]>, Thomas S. Dye <[email protected]> and
Marie-Anne Vibet <[email protected]>
Dye, T.S. (2016) Long-term rhythms in the development of Hawaiian social stratification. Journal of Archaeological Science, 71, 1–9.
data(Events); TempoActivityPlot(Events[1:1000,], c(2:5)) TempoActivityPlot(Events[1:1000,], c(2:5), count = TRUE)
data(Events); TempoActivityPlot(Events[1:1000,], c(2:5)) TempoActivityPlot(Events[1:1000,], c(2:5), count = TRUE)
A statistical graphic designed for the archaeological study of rhythms of the long term that embodies a theory of archaeological evidence for the occurrence of events.
TempoPlot(data, position, level=0.95, count = TRUE, Gauss=FALSE, title = "Tempo plot")
TempoPlot(data, position, level=0.95, count = TRUE, Gauss=FALSE, title = "Tempo plot")
data |
dataframe containing the output of the MCMC algorithm |
position |
numeric vector containing the position of the column corresponding to the MCMC chains of interest |
level |
probability corresponding to the level of confidence used for the credible interval |
count |
if TRUE the counting process is given as a number, otherwise it is a probability |
Gauss |
if TRUE, the Gaussian approximation of the CI is used |
title |
title of the graph |
It calculates the cumulative frequency of specified events by calculating how many events took place before each date in a specified range of dates.
Anne Philippe <[email protected]>, Thomas S. Dye <[email protected]> and
Marie-Anne Vibet <[email protected]>
Dye, T.S. (2016) Long-term rhythms in the development of Hawaiian social stratification. Journal of Archaeological Science, 71, 1–9.
data(Events); TempoPlot(Events[1:1000,], c(2:5)) TempoPlot(Events[1:1000,], c(2:5), count = TRUE)
data(Events); TempoPlot(Events[1:1000,], c(2:5)) TempoPlot(Events[1:1000,], c(2:5), count = TRUE)