Skip to contents

ESS of the tail-membership indicators at the prob and 1 - prob quantiles, reported as the smaller of the two.

Usage

morie_effective_sample_size_tail(chains, prob = 0.05)

Arguments

chains

matrix of draws, one row per chain.

prob

tail probability in (0, 0.5).

Value

list with ess_tail, ess_lower, ess_upper, sufficient.

Details

This is the quantity that governs CREDIBLE INTERVALS, and it is routinely the binding one: a chain can have an excellent bulk ESS and a tail ESS in the dozens, which means a trustworthy posterior mean reported alongside an interval that is mostly Monte Carlo noise.

The indicators are deliberately NOT rank-normalised. They are already 0/1, and rank-normalising a binary vector destroys the very information the statistic is built on.

References

Vehtari, A. et al. (2021). Rank-normalization, folding, and localization: an improved R-hat for assessing convergence of MCMC. Bayesian Analysis, 16(2), 667-718.

Examples

set.seed(1)
morie_effective_sample_size_tail(matrix(rnorm(4000),
                                        nrow = 4))$ess_tail > 100
#> [1] TRUE