My guess is that this is due to overflows. lam
can easily be something like 20, so imu
can be something on the order of 1e20. I don’t think you want a gamma distribution with beta=1e20. What are you trying to model? It might be better or at least easier to build a model around log(y) instead.