Description Usage Arguments Value Notes See Also Examples
chain_diagnosis
Generate plots to help assess the convergence
of MCMC output.
Generate plots of chain traces (variable values vs. iteration), auto-correlation plots and 1D densities (histograms).
1 | chain_diagnosis(chain, max.chain = 20, chatter = 0)
|
chain |
(list) containing output data from an MCMC, including |
chatter |
(integer) how verbose is the output? (0=quiet, 1=normal, 2=verbose) |
max.chains |
maximum no. chains to overlay on trace plot |
none
The input chain
should be a list such as produced by
gw_sampler
or mh_sampler
that contains the following:
(array) n * ndim array of posterior samples n samples of ndim vectors of parameters
(string) name of MCMC method used
number of chain/walkers used
The plot for parameter i
contains three panels.
Top: trace plots showing (in different colours) the trace of each chain or walker for the parameter. The thick black lines shows the trace of the mean of the chains/walkers (averaged at each iteration).
Bottom left: autocorrelations. Black shows the ACF for the mean of the chains/walkers. Blue shows the mean of the ACFs of each chain/walker.
Bottom right: historgram of parameter i
over all chains/walkers.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.