Skip to contents

Rank-normalized split R-hat, bulk and tail effective sample sizes, the effective sample size of the mean and its Monte Carlo standard error: the estimators of Vehtari et al. (2021), matching the posterior package.

Usage

mcmc_diagnostics(draws)

Arguments

draws

A matrix with one column per chain (or a list of equal-length chains).

Value

A named numeric vector: rhat, ess_bulk, ess_tail, ess_mean, mcse_mean.

Examples

set.seed(1)
mcmc_diagnostics(matrix(rnorm(4000), ncol = 4))
#>         rhat     ess_bulk     ess_tail     ess_mean    mcse_mean 
#> 1.000038e+00 3.941069e+03 4.133724e+03 3.941666e+03 1.649963e-02