Why is divergent trasition bad?

  1. divergent transitions result in a biased sample – at the end of a divergent transition, the parameter estimates are unchanged, effectively, the same draw reported twice.
  2. divergent transitions indicate that the model is ill-specified w.r.t the data.

How to resolve?
a. find out more information via reported diagnostics – RStan – https://mc-stan.org/rstan/reference/check_hmc_diagnostics.html, CmdStan and CmdStanR, CmdStanPy have “diagnose” functions.

b. run warmup longer and see if the problem goes away, or increase adapt_delta to .95

c. reparameterize – these sections of the User’s Guide should help:
https://mc-stan.org/docs/2_26/stan-users-guide/hierarchical-priors-section.html
https://mc-stan.org/docs/2_26/stan-users-guide/reparameterization-section.html

For c, draw pairs plots to see which parameters are highly correlated accordingly.