MultiMarginalPlot {ArchaeoPhases}R Documentation

Marginal posterior densities of several events

Description

Draws a plot of the estimated marginal posterior density for a parameter and adds the mean and the credible interval at the desired level

Usage

MultiMarginalPlot(
  data,
  position,
  level = 0.95,
  GridLength = 1024,
  x.scale = rep("calendar", length(position)),
  elapsed.origin = NULL,
  title = "Characteristics of several dates",
  subtitle = NULL,
  caption = "ArchaeoPhases",
  x.label = "Calendar year",
  y.label = NULL,
  y.grid = TRUE,
  x.min = NULL,
  x.max = NULL,
  legend.title = "Legend",
  height = 7,
  width = 7,
  units = "in",
  file = NULL,
  newWindow = TRUE
)

Arguments

data

Data frame 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.

GridLength

Number of equally spaced points at which the density is to be estimated (for density() function).

x.scale

One of "calendar" for calendar years, "BP" for years before present, or "elapsed" for time elapsed from a specified origin.

elapsed.origin

Position of the column to use as the origin for elapsed time calculations.

title

Title of the plot.

subtitle

Subtitle of the plot.

caption

Caption of the plot.

x.label

Label of the x-axis.

y.label

Label of the y-axis.

y.grid

Switch for horizontal grid lines.

x.min

Minimum x-axis value.

x.max

Maximum x-axis value.

legend.title

Title for the legend.

height

Plot height in units.

width

Plot width in units.

units

String recognized by the ggsave() function, one of "in", "cm", "mm".

file

Name of the file that will be saved if specified, default = NULL.

newWindow

Whether or not the plot is drawn within a new window.

Details

The density is estimated using density() function with n = GridLength. The input MCMC chains should either be in calendar years or converted to calendar years using x.scale vector or elapsed.origin.

Value

NULL, called for its side effects

Author(s)

Anne Philippe, Anne.Philippe@univ-nantes.fr and

Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr

Examples

  data(Events);
  MultiMarginalPlot(Events, position = c(2, 3, 4), level = 0.95)


[Package ArchaeoPhases version 1.8 Index]