The posterior probabilities
Hi Jaspers,
I used the JAGS module to estimate the parameters of a Bayesian mixed model, with different priors for each parameter.
I would like to know if there is a way to determine the posterior probabilities of the general model, thus calculating the Bayes Factor, to compare two different models? thanks.
hugs
Comments
Dear FrankSon,
It is often not straightforward to obtain the marginal likelihood from JAGS code. When the models are nested, you could use the Savage-Dickey density ratio (e.g., http://www.ejwagenmakers.com/2010/WagenmakersEtAlCogPsy2010.pdf). There is also the product-space method, but it requires care (e.g., http://www.ejwagenmakers.com/2011/LodewyckxEtAl2011.pdf). The most generic and powerful method that I have worked with is an efficient version of bridge sampling (e.g., https://doi.org/10.18637/jss.v092.i10; see also https://www.sciencedirect.com/science/article/pii/S0022249617300640) but it works a little better with Stan than with JAGS, unfortunately.
Cheers,
E.J.
Thanks