MCMC.diagnostics {rbacon} | R Documentation |
Test mixing and stationarity of the MCMC run
Description
Test how well-mixed and stationary the MCMC run is. A good value for the effective sample size ('ess', number of effective independent samples from the MCMC iterations) is >200 (>1000 indicates an excelling mixing). Besides the mixing, stationarity 'z' is also measured (the start of the run is compared with the end). A 'z' below 1.96 (1 standard deviation) indicates no drift, and if it is >2.58 (2 standard deviations) then the MCMC chain is likely drifting.
Usage
MCMC.diagnostics(set = get("info"), ssize = nrow(set$output))
Arguments
set |
Detailed information of the current run, stored within this session's memory as variable |
ssize |
Number of MCMC iterations. |
Details
Generally Bacon will perform millions of MCMC iterations for each age-model run, although only a fraction of these will be stored. In most cases the remaining MCMC iterations will be well mixed (ess, and also visually check that the upper left panel of the fit of the iterations shows no strange features such as sudden systematic drops or rises).
Value
The 'ess' and 'z' scores, together with an evaluation of the values.
Examples
Bacon(ssize=100, coredir=tempfile()) # check the reported warnings