# [R-sig-ME] lme4 vs. HLM (program) - differences in estimation?

Doran, Harold HDoran at air.org
Tue Nov 18 21:39:23 CET 2008

> I'm not sure about that.  I believe that Felix is correct
> that the "centered" part refers to the difference between the
> student's ses score and some standard value and the "group
> mean centered" would refer to using the observed mean ses for
> each group as the centering value.  The variable ses.gmc
> would vary with person i in school j but it would have the
> property that the values of ses.gmc summed across all the
> students in school j would be zero.

You're right. I do this so rarely I had forgotten. I referred to my HLM
book and they note that a group mean centered variable is

x_{ij} - \bar{X_{.j}}

Where \bar{X_{.j}} is the mean of the variable x for individuals in
group j. Now, I still suspect a data difference. My suspicion is that
HLM is doing the group mean centering using the variable meanses, which
is not the same group mean variable as Felix computes in R, which is
done properly.