[R-sig-ME] BLUPs of the random effects from MCMCglmm
M.Fairbrother at bristol.ac.uk
Mon Jan 26 09:28:02 CET 2015
I'm trying to understand how to extract BLUPs of the random effects from
LMMs, and GLMMs, fitted with MCMCglmm.
To use a simple example:
m2 <- lmer(PO ~ 1 + (1 | FSfamily), PlodiaPO)
MC2 <- MCMCglmm(PO ~ 1, random = ~ FSfamily, data=PlodiaPO, verbose=F, pr=T)
The help file for "ranef" in the lme4 package says this function
"extract[s] the conditional modes of the random effects from a fitted model
object. For linear mixed models the conditional modes of the random effects
are also the conditional means."
Bracketing some conceptual fuzziness, threads like <
suggest "ranef" yields BLUPs.
But how do I get the equivalent from an MCMCglmm object (like MC2 here)?
In the thread <
Jarrod says that, with some conditions, "The marginal posterior modes of
the random effects should coincide with BLUPs...". So does that mean
"posterior.mode" is the function to use here?
And given the statement about modes and means in the statement about ranef
above, alternatively, would colMeans work with MCMCglmm in the case of a
LMM, but not GLMM?
In this simple example, the three approaches yield very similar results:
But maybe that doesn't always happen.
(I also came across the thread <
that raises some broader questions of principle which I'll park for now.)
Any assistance would be greatly appreciated.
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models