Learn R Programming

ArchaeoPhases (version 1.4)

PhasePlot: Plot of the characteristics of a group of dates

Description

This function draws the marginal posterior densities of the minimum and the maximum of the dates included in the phase

Usage

PhasePlot(PhaseMin_chain, PhaseMax_chain, level = 0.95,
  title = "Characterisation 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 minimum and the maximum of the dates included in the phase and adds several summary statistics (mean, Credible interval, Time range). The result is given in calendar year (in format BC/AD).

Examples

Run this code
# NOT RUN {
  data(Phases); attach(Phases)

  #PhasePlot(Phase.1.alpha, Phase.1.beta, level = 0.95, title = "Densities of Phase 1")
  PhasePlot(Phase.2.alpha, Phase.2.beta, level = 0.95, title = "Densities of Phase 2", 
  colors = FALSE, exportFile = "CharacteristicsOfPhase", exportFormat = "SVG")
# }

Run the code above in your browser using DataLab