# multi_marginal_statistics: Marginal summary statistics for multiple MCMC chains In ArchaeoPhases: Post-Processing of the Markov Chain Simulated by 'ChronoModel', 'Oxcal' or 'BCal'

 multi_marginal_statistics R Documentation

## Marginal summary statistics for multiple MCMC chains

### Description

Calculates summary statistics of the output of the MCMC algorithm for multiple parameters. Results are given in calendar years (BC/AD).

### Usage

```multi_marginal_statistics(
data,
position = 1:ncol(data),
level = 0.95,
round_to = 0
)
```

### Arguments

 `data` Data frame containing the output of the MCMC algorithm. `position` Numeric vector containing the positions of the columns corresponding to the MCMC chains of interest, or a vector of column names. `level` Probability corresponding to the level of confidence used for the credible interval and the highest posterior density region. `round_to` Integer indicating the number of decimal places.

### Value

A data frame where the rows correspond to the chains of interest and columns to the following statistics:

mean

The mean of the MCMC chain.

sd

The standard deviation of the MCMC chain.

min

Minimum value of the MCMC chain;

q1

First quantile of the MCMC chain;

median

Median of the MCMC chain;

q3

Third quantile of the MCMC chain; and

max

Maximum value of the MCMC chain.

ci.inf

Lower credible interval of the MCMC chain at `level`.

ci.sup

Upper credible interval of the MCMC chain at `level`.

### Author(s)

Anne Philippe, Anne.Philippe@univ-nantes.fr,

Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr, and

Thomas S. Dye, tsd@tsdye.online

### Examples

```  data(Events)
multi_marginal_statistics(Events, 2:5)
multi_marginal_statistics(Events, 2:5, level = 0.90)
## round to decades
multi_marginal_statistics(Events, 2:5, round_to = -1)

```

ArchaeoPhases documentation built on March 18, 2022, 5:44 p.m.