mrc-ide / drjacoby

Flexible Markov chain monte carlo via reparameterization
https://mrc-ide.github.io/drjacoby/
Other
12 stars 5 forks source link

DIC calculation for random effects models #118

Open bobverity opened 1 year ago

bobverity commented 1 year ago

Patrick made a good point about random effects models, which seem to break our DIC estimates.

Imagine model1 in which data are drawn from groups with independent means. Also model2 in which the group means themselves have a distriution over them (random effects model). Currently, we may implement model2 by adding an additional term in the likelihood. But if so, the likelihood will always tend to be lower under model2 because there is an additional probability distribution multiplied through. This means DIC values (which are based on likelihoods only) will favour model1.

Can we solve this by just moving the random effects part to the prior, rather than the likelihood? Maybe I have also missed/forgotten something about Patrick's problem - will need to speak to him to recall exactly the issue. if this can be solved by pushing to the prior then we need a tutorial on this on the website to ensure people do this properly.