MarginalPlot {RChronoModel} | R Documentation |
Plot of a marginal posterior density
Description
This function draws the density of a one-parameter and adds summary statistics.
Usage
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
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)
[Package RChronoModel version 0.4 Index]