Integrated Autocorrelation Times (IAT/IAC)

I wonder if there’s a clean way to calculate IAT from the Stan output. The documentation on LaplaceDeamon says

The IAT of a continuous chain correlates with the variability of the mean of the chain and relates to Effective Sample Size (ESS) and Monte Carlo Standard Error (MCSE). IAT and ESS are inversely related, though not perfectly because each is estimated a little differently. Given NN samples and taking autocorrelation into account, ESS estimates a reduced number of MM samples. Conversely, IAT estimates the number of autocorrelated samples, on average, required to produce one independently drawn sample.

I came across the Sokal (1997) reference, but could not see how to relate his definition of IAT with the ESS/MCSE measures available in posterior::summary(). I understand that this is something that is only meaningful per chain.

References:
Sokal, A. (1997). Monte Carlo Methods in Statistical Mechanics: Foundations and New Algorithms. NATO ASI Series, 131–192. doi:10.1007/978-1-4899-0319-8_6

1 Like

The integrated autocorrelation time for a given expectand (it can vary from expectand to expectand) is just the number of iterations divided by that expectand’s effective sample size estimator; see for example Markov Chain Monte Carlo in Practice.

I wouldn’t take that last sentence from Sokal too seriously as the wording doesn’t really correspond to the actual mathematics and it depends on a lot of unstated assumptions.

1 Like