Thank you @alj for you answer!
Yes, want I want to predict is the number of Claims. I’m sorry if it was not clear on my code. I tried different solution, that’s why I computed a new variable rates.
I know the default sampling method is NUTS. Using Metropolis is the specific of my own project. The topic is indeed Metropolis-Hastings Algorithm.
I tried copy and paste your code on my notebook, but when I run the code there are a lot of overflow during computation. I think it’s due to the fact that there are lots of zeros in the dataset in ‘Claims’ variable. Do I have to add some code before the “pm.Model” part?