Thanks Brian for all your kind help.
"didn't mean to imply that the different parameterization of the contrasts
would make the lm estimates agree more with the lmer estimates, only that
it might be easier to compare the regression summary output to see how
similar/dissimilar they were ".
Got it
Utkarsh: I think the differences between the lm and lmer estimates of the
intercept are consistent with the regularization effect expected with
mixed-effects models where the estimates shrink towards the mean slightly.
I don't think there is any reason to expect exact agreement between the lm
and
Hi Brian,
This makes some sense to me theoretically, but doesn't pan out with my
experiment.
The contrasts default was the following as you said:
> options("contrasts")
$contrasts
unordered ordered
"contr.treatment" "contr.poly"
I changed it as follows:
>
Your lm() estimates are using the default contrasts of contr.treatment,
providing an intercept corresponding to your subject 308 and the other
subject* estimates are differences from subject 308 intercept. You could
have specified this with contrasts as contr.sum and the estimates would be
more
Hello Thierry,
Thank you for your quick response. Sorry, but I am not sure if I follow
what you said. I get the following outputs from the two models:
> coef(lmer(Reaction ~ Days + (1| Subject), sleepstudy))
Subject(Intercept) Days
308292.1888 10.46729
309173.5556 10.46729
310
The parametrisation is different.
The intercept in model 1 is the effect of the "average" subject at days ==
0.
The intercept in model 2 is the effect of the first subject at days == 0.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team
6 matches
Mail list logo