# Parameter estimates and post analysis of MCMC output

Remember and note that

- the main bayz program generates and saves MCMC output, which needs to be summarised in one or more following steps
- there is not one definitive way to present Bayesian parameter estimates

Below is a short overview of the possibilities to use the MCMC output, details are provided in the sub-pages in this section.

## Simple posterior mean and SD

The posterior mean and posterior SD are the most used statistics to summarise MCMC output and to provide parameter
estimates. The small command-line tool pbayz (supplied with bayz) makes different (small, large, selected) parameter-summaries
by computing mean and SD of the saved samples. Details are explained on the page
Summaries with pbayz.

Note: the posterior mean is not always the best summary statistic, for instance, it may not reveal that a variance has a
large probability density near zero when it has large uncertainty (has a wide long-tailed distribution).
Adding additional statistics such as mode, median and HPD (see below) can be useful.

## Densities, mode, median, HPD

Sample output from bayz can be imported in R, which provides a flexible way to compute parameter statistics that go
beyond the simpel mean and SD from pbayz, to plot densities, and computer posterior mean and SD for functions of model
parameters. See the page Summaries with R

## MCMC convergence diagnosis

By importing the MCMC output in R, convergence diagnostics and estimates
of Monte Carlo error can be obtained using the R coda package.
See the page on Using R coda.

## Model fit and comparison

One way to compare models with bayz is to compute the Deviance Information Criterion, see the page
Computing DIC.