Learn R Programming

ArchaeoPhases (version 1.4)

PhaseDurationPlot: Plot of the duration of a group

Description

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)

Usage

PhaseDurationPlot(PhaseMin_chain, PhaseMax_chain, level=0.95, 
title = "Duration of a group of dates", colors = TRUE, 
exportFile = NULL, exportFormat = "PNG", GridLength = 1024)

Arguments

PhaseMin_chain

numeric vector containing the output of the MCMC algorithm for the minimum of the dates included in the phase. The MCMC samples should be in calendar year (BC/AD).

PhaseMax_chain

numeric vector containing the output of the MCMC algorithm for the maximum of the dates included in the phase. The MCMC samples should be in calendar year (BC/AD).

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

exportFile

the name of the file to be saved. If NULL then no graph is saved.

exportFormat

the format of the export file : SVG or PNG.

GridLength

length of the grid used to estimate the density

Value

A plot with the marginal posterior densities of the duration of a phase and adds several summary statistics (mean, Credible interval, Time range). The result is given in year.

Examples

Run this code
# NOT RUN {
  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)
# }

Run the code above in your browser using DataLab