Summarising diagnostics from a coda::mcmc.list, partly derived from
Kruschke 2015.
Value
A data.frame of class diagnostic_summary with the row names according
to the parameters to be monitored and the following numeric columns:
PSRF Point est.Potential scale reduction factor (= Gelman-Rubin statistic), a measure of the mixing of chains.PSRF Upper C.I.The upper limit of the 0.95-confidence interval of the PSRF.MeanArithmetic mean of the estimates.MedianMedian of the estimates.ModeMode of the estimates.ESSEffective sample size, a control of autocorrelation.MCSEMonte Carlo standard error.HDImassCredibility level of the highest density interval.HDIlowStart of the highest density interval.HDIhighEnd of the highest density interval.
Details
Because the first threshold is fixed, the Gelman-Rubin multivariate PSRF
will always throw an error, so this is automatically set to FALSE. If
the gelman diagnostics still produce an error, deactivate gelman_diag
altogether by setting it to FALSE, too.
References
Kruschke JK (2015). Doing Bayesian data analysis: a tutorial with R, JAGS, and Stan. Academic Press, Amsterdam.
Examples
if (FALSE) { # interactive()
# select Sorsum data with auricular surface after Lovejoy et al. 1985
sorsum <- sorsum_as[,2]
# example with default settings, please be patient
sorsum_res <- bay.ta(method = sorsum)
# compute diagnostics of the MCMC samples
sorsum_diag <- diagnostic.summary(sorsum_res)
# show first rows
head(sorsum_diag)
}
