# Divergence transition rate calculation

Hi Stan experts, I have a question about calculating the divergence transition rate. If I have 1049 divergence transitions after warmup and I ran 4000 iterations and 3 chains, and I have 5088 parameters in total to estimate, is my divergence transitions rate 1049/(2000x3) or 1049/(2000x3x5088)? And if the latter, the divergence transition rate is then 0.003436%, which is nearly zero, do I have to worry about the divergence transitions in this case? And is there a quick way to identify which parameter estimates are problematic? Thanks!

Hello!

It is the former (~1.75%).

All parameter estimates are potentially problematic when there are divergent transitions. To explore which parts of your model might be driving these divergences I would read: Divergent transitions - a primer and the links therein.

2 Likes

Thanks for your reply! So it’s then around 17.48%? Could you explain why it’s the former? Does 4000 iterations and 3 chains mean 4000 iterations and 3 chains for each parameter? If the former is the case, does it mean every parameter has 1049 divergence transitions? Thanks!

Yes, multiplying by 100 is difficult before the morning coffee has been fully absorbed.

Yes. Say your model has 3 parameters \alpha, \beta, \kappa, and we put them all together in a vector \boldsymbol{\theta} = (\alpha, \beta, \kappa). Each iteration is one one value of \boldsymbol{\theta}. A divergent transition refers to one iteration of \boldsymbol{\theta}, as all of the elements of \boldsymbol{\theta} are updated at once. So this:

is mostly correct, but it is slightly more nuanced.

1 Like