Help with Model Structure in PyMC

Dear @vaanderal ,
don’t worry, the process of learning is completely normal.
And I particularly sense some confusion about terminology in you model. Things to consider:

  • an “intercept” is not a “hyperprior”. The intercept should be defined separately and add to the estimate.
  • the hyperprior for different slopes (=“offsets”) may not be the same; each has their own “population level slope”
  • the “dog” offset might be problematic, because it can be 1:1 related to “sex” (maybe also to “age”, unless you have longitudinal data of dogs). If the relation is indeed 1:1, the sampler will have trouble “choosing” one slope for a potential effect, and might fail to converge.

At first glance, the rest looks rather plausible, but you start with a lot at once. I suggest you break down the model and construct it one by one: first, a model with only the intercept, if it works, you already have something. Then maybe add the “sex” slope, then “age” and so forth.

And just a suggestion, maybe check again with the pymc docs examples and the many blog posts out there, try to download the data and re-construct the model. You’re certainly capable to learn yourself!

And good luck with the dog betting :slight_smile:
Cheers!