MarginalPlot {ArchaeoPhases}R Documentation

Plot a marginal posterior density

Description

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

Usage

MarginalPlot(
  a_chain,
  level = 0.95,
  GridLength = 1024,
  title = "Characteristics of a date",
  subtitle = NULL,
  caption = "ArchaeoPhases",
  x.label = "Calendar year",
  y.label = NULL,
  y.grid = TRUE,
  x.scale = "calendar",
  elapsed.origin.position = NULL,
  x.min = NULL,
  x.max = NULL,
  height = 7,
  width = 7,
  units = "in",
  file = NULL,
  newWindow = TRUE
)

Arguments

a_chain

Numeric vector containing the output of the MCMC algorithm for the parameter.

level

Probability corresponding to the level of confidence.

GridLength

Length of the grid used to estimate the density.

title

Title of the graph.

subtitle

Subtitle of the graph.

caption

Caption of the graph.

x.label

Label of the x-axis.

y.label

Label of the y-axis.

y.grid

Switch for horizontal grid lines.

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

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

x.min

Minimum x axis value.

x.max

Maximum x axis value.

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 chosen, 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.

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);
  MarginalPlot(a_chain = Events$Event.1, level = 0.95)


[Package ArchaeoPhases version 1.8 Index]