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

Jarrod Hadfield j.hadfield at ed.ac.uk
Mon Jan 26 10:25:16 CET 2015


Hi Malcolm,

BLUPs are exactly equivalent to the posterior mode (and posterior  
mean) random effects in a LMM when the variance components are known.  
When they are known the joint distribution of the random effects is  
multivariate normal and so the mean and mode coincide. More generally,  
BLUPs will not exactly coincide with the marginal mode/means from  
MCMCglmm, because their distribution is marginal with respect to the  
variance components rather than being conditional on them. My guess is  
that they are very close in practice though. The posterior mean has  
lower Monte Carlo error than the posterior mode, so if the marginal  
distributions are symmetric I would use the posterior mean.

Cheers,

Jarrod





Quoting Malcolm Fairbrother <M.Fairbrother at bristol.ac.uk> on Mon, 26  
Jan 2015 02:28:02 -0600:

> 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:
> library(lme4)
> library(MCMCglmm)
> data(PlodiaPO)
> 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 <
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q1/000128.html>
> suggest "ranef" yields BLUPs.
>
> But how do I get the equivalent from an MCMCglmm object (like MC2 here)?
> Two possibilities:
> colMeans(MC2$Sol[,-1])
> or
> posterior.mode(MC2$Sol[,-1])
>
> In the thread <
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2012q1/017565.html>,
> 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]),
> posterior.mode(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,
> Malcolm
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



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