Hi everyone,

I was wondering if the effective sample size calculation as described in Vehtari et al 2019 could be applied to MCMC sampler whose chains are not formally independent like Goodman & Weare’s Affine Invariant Markov chain Monte Carlo (emcee is a python package that implements this algorithm).

I have been reading the \hat{R}-ESS paper, and there are various references to *independent* chains, however, they are assumed to be correlated, so it looks like they are not really treated as independent. So my question basically is: *does the fact that MCMC chains in HMC/NUTS are formally independent have any relevance for the effective sample size algorithm? Could this algorithm be applied to the results of affine invariant MCMC runs?*

I suspect the algorithm is valid for both, and I have done some simple experiments which seem to agree with this statement, but it would be great to have some proper explanations about the applicability conditions of the algorithm.

Here is the link to the complete code for the experiments using emcee, and below there is one comparison between emcee’s autocorrelation time estimation, the initial proposal from Goodman & Weare to calculate autocorrelation and ArviZ implementation:

### References

- Aki Vehtari, Andrew Gelman, Daniel Simpson, Bob Carpenter, Paul-Christian Bürkner (2019): Rank-normalization, folding, and localization: An improved \hat{R} for assessing convergence of MCMC. arXiv preprint arXiv:1903.08008.