Learn R Programming

RChronoModel (version 0.1)

MultiPhasePlot: Plot of the marginal posterior densities of several phases

Description

Draws a plot with the marginal posterior densities of the beginning and the end of all phases. No temporal order between phases is required.

Usage

MultiPhasePlot(file, position, level = 0.95, dec = '.', sep=',', comment.char='#',
  title = "Phases marginal posterior densities", GridLength = 1024)

Arguments

file
name of the CSV file containing the output of the MCMC algorithm of all phases of interest
position
numeric vector containing the position of the phases of interest in the CSV file
level
probability corresponding to the level of confidence
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()
title
title of the graph
GridLength
length of the grid used to estimate the density

Value

  • Draws a plot with the marginal posterior densities of the beginning and the end of all phases and adds the time range of each phase.

Examples

Run this code
data(Phases)
  write.csv(Phases, "data.csv")
  MultiPhasePlot("data.csv", c(4,2),level = 0.95, title="Densities of phase 1 and phase 2")

Run the code above in your browser using DataLab