MarginalPlot: Plot of a marginal posterior density

Description Usage Arguments Details Value Author(s) Examples

View source: R/prog.R

Description

This function draws the density of a one-parameter and adds summary statistics.

Usage

1
2
MarginalPlot(a_chain, level = 0.95, title = "Marginal posterior density",
  colors = T, GridLength = 1024)

Arguments

a_chain

numeric vector containing the output of the MCMC algorithm for a one-parameter

level

probability corresponding to the level of confidence

title

label of the title

colors

if TRUE -> use of colors in the graph

GridLength

length of the grid used to estimate the density

Details

The density is estimated using density() function with n=GridLength.

Value

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

Author(s)

Anne Philippe <Anne.Philippe@univ-nantes.fr> and

Marie-Anne Vibet <Marie-Anne.Vibet@univ-nantes.fr>

Examples

1
2
3
4
5
6
7
  data(Events); attach(Events)

  MarginalPlot(Event.1, 0.95)
  MarginalPlot(Event.1, 0.50)

  MarginalPlot(Event.2, 0.95, title="Marginal density plot of Event 2")
  MarginalPlot(Event.2, 0.95, colors = FALSE)

RChronoModel documentation built on May 1, 2019, 10:06 p.m.