Learn R Programming

RChronoModel (version 0.4)

MarginalStatistics: Marginal summary statistics

Description

Gives a list of summary statistics resulting from the output of the MCMC algorithm for a one-parameter.

Usage

MarginalStatistics(a_chain, level = 0.95, max_decimal = 0)

Arguments

a_chain
numeric vector containing the output of the MCMC algorithm for a one-parameter
level
probability corresponding to the level of confidence used for the credible interval and the highest density region
max_decimal
maximum number of decimal

Value

A matrix of values corresponding to the following summary statistics

Details

The 100*level % HPD (highest posterior density) region is estimated using HDR function from Package 'hdrcde'.

References

Hyndman, R.J. (1996) Computing and graphing highest density regions. American Statistician, 50, 120-126.

Examples

Run this code

  data(Events); attach(Events)
  
  MarginalStatistics(Event.1)
  MarginalStatistics(Event.2, level = 0.90)
  

Run the code above in your browser using DataLab