MarginalStatistics {ArchaeoPhases} | R Documentation |
Calculates summary statistics of the output of the MCMC algorithm for a one-parameter. Results are given in calendar years (BC/AD).
MarginalStatistics(a_chain, level = 0.95, roundingOfValue = 0)
a_chain |
Numeric vector containing the output of the MCMC algorithm for the parameter. |
level |
Probability corresponding to the level of confidence used for the credible interval and the highest posterior density region. |
roundingOfValue |
Integer indicating the number of decimal places. |
The (100 * level)
\
A named matrix of values corresponding to all the following statistics:
The title of the summary statistics.
The mean of the MCMC chain. Use of mean()
function.
The maximum a posteriori of the MCMC chain. Use of hdr()
function.
The standard deviation of the MCMC chain. Use of sd()
function.
The quantiles of the MCMC chain corresponding to 0.25, 0.50 and 0.75. Use of quantile
function.
The credible interval corresponding to the desired level. Use of CredibleInterval()
function.
The highest posterior density regions corresponding to the desired level. Use of hdr()
function.
Anne Philippe, Anne.Philippe@univ-nantes.fr and
Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr
Hyndman, R. J. (1996) Computing and graphing highest density regions. American Statistician, 50, 120-126.
data(Events); attach(Events)
MarginalStatistics(Event.1)
MarginalStatistics(Event.2, level = 0.90)