Rewriting Likelihood with Potential Causes the Gradient to Crash

@OriolAbril thanks for your answer.

The issue may be due to the product of logp from the Poissons instead it being a sum

Yes, indeed. Of course, what I really wanted was the sum of the log-likelihoods, not the product – which may have caused some overflow eventually creating the error. If I rewrite the model correctly, it works. As I suspected the issue was trivial, but there are a lot of moving pieces for a beginner, thanks again for having the patience to point this out!

You should also consider using a weakly informative prior instead of a flat one

Once I have the full model up and running, I will experiment with different priors. Thanks for the heads-up!

1 Like