Condition n_eff >= target_n_eff
has the problem that it doesn’t recognize antithetic chains, which should be thinned, too. Instead of having target_n_eff = 0.8 * stan_sims
, it would be better to have, e.g., n_eff_reltol=0.2
and then condition (n_eff/stan_sims >= 1-n_eff_reltol && n_eff/stan_sims <= 1+n_eff_reltol)
2 Likes