Hello, I am quite new to Stan, for my master thesis I have been using BUGS, but I had to move due to the complexity of the models. I’ve spent quite a bit of time understanding how it works behind the scenes, and I’ve seen that it’s important to take divergences into account.
I am using a “new” probability distribution. From 1500 iterations, 944 divergences come out. Raising adapt_delta to 0.99 brought them down to 780. I’ve looked at bayesplot tutorials and others but none help. I have tried to plot the divergence vs non-divergence random effects, but the only pattern is that the ones that diverge are more focused on the scatter. I haven’t found any pattern, and I don’t know if I could give the model as valid, or if I should put some justification in my thesis. The only pattern found is in teh acceptance rate, but it looks like a fine line. Thank you all in advance divergence.pdf (24.1 KB)
It’s the Skellam’s distribution. So it is not “new”, but I wanted to refer to it as user-defined one. When using random effects to take into account the longitudinal data is when the divergences arise.
Yes, I tried the same model for the dataset, removing the repeated observations and hence, also the random intercept. Works fine. Simulating manually a data set like the one I am using, with random effects, and using it in the bayesian model, also raises a warning of divergences, but this time only about 40. All parameters of the regression came close except for 2.
Is there any way to look for the “root” of the cause? Can I ignore divergences?