Fantasy Football Hierarchical Model Questions

Thanks for your thoughts, @jessegrabowski. Very good point about the season’s projected points being deterministic per-player. Unfortunately the projections are the entire dataset, so there is not variation per week/game. That’s what I was hoping to get out of this analysis - a per-week breakdown that sums to the projected points - which should be doable once the latent variables are known.

Yeah, my offense vs. defense notation was confusing. Given the interchangeability of player/team (at least at the single position level), just having an “opponent” column would suffice. However, doesn’t this break down in a position like wide-receiver where there are multiple on the field at once? In that case, the individual player may have a different contribution than the broader team’s ability at the position. Perhaps this is why you think including all positions together make the most sense. Would love to hear your additional thoughts.

I opted to exclude players that have season projections of zero. Given that my goal is to get weekly projections, they’d obviously have projections of zero each week. It shrinks the data a bit but should only help the sampler IMO.

I also changed from my summation strategy and went back to one theta as you suggested. I’m definitely getting low effective sample sizes, but I imagine that’s because there are only 1/17 unique observed values (17 games in a season).

New Colab notebook to reflect these changes: link.
Locally I only got one divergence when I ran this, so there must be something different sampler-wise in the notebook. In any case, I only have one correlated pair of variables - intercept and player_std. My guess is that the sampler is always attributing the random noise to one of the two, but is there a way to break this relationship?

I ultimately would love to put all positions into one model, but my concerns are that ex: D/ST and kicker have very different “opponents” on the field compared to the rest of the positions (which all play against the standard defense). I would definitely have a hierarchical variable for the specific positions in this case, but again I think the stark contrast in actual “opponent” for some positions would muddle the team effects. That’s why I initially am trying to do it per-position, where none of that information needs to be accounted for. Thoughts?