Can I ignore Max_treedepth and adapt_delta warnings if I am getting desirable results?


I am fitting a very complicated model to data in pystan. Although I am getting good convergence, according to n_eff and R_hat, I always get the warnings:

WARNING:pystan:336 of 4000 iterations ended with a divergence (8.4 %).
WARNING:pystan:Try running with adapt_delta larger than 0.8 to remove the divergences.
WARNING:pystan:2015 of 4000 iterations saturated the maximum tree depth of 10 (50.4 %)

However, the results are quite good and I am happy with them.

If I increase max_treedepth and adapt_delta as suggested, the fit takes very long time; so I am reluctant.
I know it’s always better to solve the warnings, but the model is so complicated it would take a lot of effort to reparametrize it (though there is no guarantee that this warnings won’t appear again). And, I am already getting good results for all the fits.

Can I simply ignore the warnings? I am looking for short answers first like:
A. I can’t. I should NEVER ignore these warnings.
B. Yes I can.
C. It depends upon the problem in hand. If the results are good, I can go ahead with these warnings.


In general you shouldn’t ignore those warnings, as they indicate that something in the geometry of your problem makes it hard for MCMC to explore: so, you can’t tell how the unexplored regions may affect your results. You’ll find answers to your questions and suggestions on how to remove these warnings in Divergent transitions - a primer.

1 Like