[R-sig-ME] Getting the predicted fitted mean values for fixed effects from an lmer model

Ben Bolker bbolker at gmail.com
Fri Nov 23 20:53:27 CET 2012

Ishani Banerji <ibanerji at ...> writes:

> Hi,
> I am working on my dissertation currently, and have been using the lme4
> package to analyze the data. I have been able to use the lmer command to
> generate models just fine, but have been unable to find a way to get the
> predicted mean values for the fixed effects.


> So how do I go about getting the predicted means and standard deviations
> for the various effects? I am interested in the means for the "main
> effects" of each of the fixed variables, as well as the higher order
> interactions.
> I have tried every method that I came across online (including using
> packages like MixMod, the plotLMER.fnc, etc.) but nothing seems to give me
> what I need.

  (1) For the predicted values: either (a) use the code posted
at http://glmm.wikidot.com/faq , or (b) use the predict() function
in the development version of lme4.  (2) For the standard deviations:
see 1(a).  (1b doesn't work because the solution in 1a only accounts
for error in the fixed effects ... see various other discussion
on this mailing list and the FAQ site.)

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