Source: https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
- Specifically for low BFMI warnings:
- Look at the
pairs
plot to see which primitive parameters are correlated with theenergy__
margin. - The primitive parameters that are correlated with the
energy__
margin in thepairs
plot are a good place to start thinking about reparameterizations. There should be be a negative relationship betweenlp__
andenergy__
in thepairs
plot, but this is not a concern becauselp__
is the logarithm of the posterior kernel rather than a primitive parameter.
- Look at the
- Specifically for Rhat, ESS, low BFMI warnings: You might try setting a higher number of warmup or sampling iterations. Increasing the number of iterations is rarely helpful for resolving divergences/max treedepth warnings.
- Look at change in bulk-ESS and tail-ESS when the number of iterations increase. If R-hat is less than 1.01 and ESS grows linearly with the number of iterations and eventually exceeds the recommended limit, the mixing is sufficient but MCMC has high autocorrelation requiring a large number of iterations.
prepare_growth_data.R