Hi all,
I have formulated a hierarchical model which assumes that the observations for each group can be modelled with a specific parametric distribution family. Each group has a different parameter set, and these are themselves drawn from a distribution. Fairly typical stuff so far, I think.
But I’d like the model to acknowledge the correlations between parameters across the groups, rather than assume independence.
My thought was to use pm.MvNormal()
(or, ideally, some sort of Copula function, which I’m not sure is yet possible) and then access the marginals from this to use as the parameters of the likelihood function for each group. But I wasn’t sure how (or whether) this can be done. Is there some way of indexing the distribution to access different marginals?
Any help greatly appreciated!