Skip to content
Prev 2451 / 20628 Next

Rasch with lme4

Daniel Ezra Johnson wrote:
They're still similar for the example I tried.  (lmer vs. lm)

   Intercept:  250.0442 (SE = 10.0442) vs 293.6628 (SE = 10.8062)
   Days:    10.4498 (SE = 0.8067) vs 10.4511 (SE = 0.8067)
   SexMale: 2.5910 (SE = 4.6849) vs 2.4017 (SE = 4.6864)

(See below.)  The largest difference is in intercepts.

So I still need a good counterexample.  I feel a term like "shrinkage" 
will be involved in an explanation.

A

P.S. I guess lm still is a mixed effects approach - the residuals are a 
random effect at the level of observations? :-)


-------------------------------------------------------------------

 > M1 = lmer(Reaction ~ Days + (1|Subject), sleepstudy)
 >
 > # Use the random intercept to make up a Male/Female IV
 > sleepstudy$Sex = 
cut(ranef(M1)$Subject$"(Intercept)",2,labels=c("Female","Male"))
 >
 > # Now again: the same models:
 >
 > M1 = lmer(Reaction ~ Days + Sex + (1|Subject), sleepstudy)
 > summary(M1)
...
             Estimate Std. Error t value
(Intercept) 250.0442    10.0442  24.894
Days         10.4498     0.8067  12.954
SexMale       2.5910     4.6849   0.553

 >
 > M2 = lm(Reaction ~ Days + Sex + factor(Subject), sleepstudy)
 > summary(M2)

...

Coefficients:
                     Estimate Std. Error t value Pr(>|t|)
(Intercept)         293.6628    10.8062  27.176  < 2e-16 ***
Days                 10.4511     0.8067  12.956  < 2e-16 ***
SexMale               2.4017     4.6864   0.512 0.609020
...