[R-sig-ME] BLUPs of the random effects from MCMCglmm

Malcolm Fairbrother M.Fairbrother at bristol.ac.uk
Mon Jan 26 09:28:02 CET 2015

Dear all,

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)?
Two possibilities:

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:
cor(cbind(ranef(m2)$FSfamily, colMeans(MC2$Sol[,-1]),

But maybe that doesn't always happen.

(I also came across the thread <
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2011q1/015947.html>, but
that raises some broader questions of principle which I'll park for now.)

Any assistance would be greatly appreciated.

Many thanks,

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list