Missing parameters and priors

The model is doing that automatically thanks to the fact that you declared T as the number of timepoints and X as a matrix (ok, multi-dimensional array) where each participant gets a value for each timepoint. theta_pr too has a value for each participant and timepoint combination and is constrained by X and C in its sampling, and finally the likelihood involving theta_pr (through theta) constrains everything yet again by whatever data is actually observed.

1 Like

aw I see! (I hope so.)
So if I estimate a parameter, and as long as my theta_pr array has all the subject X time combinations, there is no need to declare missing parameters (like in Stan guide for missing data) in the parameters block, right? Even if some data is missing to estimate theta from, the missing thetas are still constrained by C*X. Do I understand it correctly?

Precisely!

Yeah, the missing data section could be more clear about when it is necessary. Generally it’s not necessary for hierarchical data, as the typical ways of modelling said data already involve expressing a latent structure that achieves missing data imputation automatically.

Horray! Can I still call it imputation though?

Sure. It’s just as much imputation as if you had to do it explicitly. In both scenarios you are letting other using information from the prior and non-missing data to constrain sampling of things influenced by missing data.

1 Like

Thanks so much. I’ll change my model.

1 Like