[R-sig-ME] bayes factors for MCMCglmm
Ben Bolker
bbolker at gmail.com
Tue Aug 28 04:43:23 CEST 2012
Mikhail Matz <matz at ...> writes:
> Hello - is it possible to calculate hayes factors for MCMCglmm
> objects, to compare alternative models? Mikhail
Well, MCMCglmm gives you a posterior sample for the deviance, so
in principle you could calculate the harmonic mean of the likelihood,
e.g.
data(PlodiaPO)
model1<-MCMCglmm(PO~1, random=~FSfamily, data=PlodiaPO, verbose=FALSE)
likchain <- exp(-model1$Deviance/2)
1/mean(1/likchain)
these are ridiculously big numbers -- that may have something
to do with the way the deviance is scaled.
However, harmonic means are known to be really, really
dodgy estimates of the Bayes factor -- see e.g.
http://scholarworks.umass.edu/cgi/viewcontent.cgi?
article=1107&context=astro_faculty_pubs
(warning, broken URL)
Perhaps someone else will contribute something more useful.
You could also use DIC to compare models, although it has
its own issues ...
More information about the R-sig-mixed-models
mailing list