[R] Linear model vs Mixed model
    Utkarsh Singhal 
    utkarsh.iit at gmail.com
       
    Tue Jul 12 15:35:14 CEST 2016
    
    
  
Hi experts,
While the slope is coming out to be identical in the two methods below, the
intercepts are not. As far as I understand, both are formulations are
identical in the sense that these are asking for a slope corresponding to
'Days' and a separate intercept term for each Subject.
# Model-1
library(lmer)
coef(lmer(Reaction ~ Days + (1| Subject), sleepstudy))
# Model-2
coef(lm(Reaction ~ Days + Subject, sleepstudy))
Can somebody tell me the reason? Are the above formulations actually
different or is it due to different optimization method used?
Thank you.
Utkarsh Singhal
91.96508.54333
	[[alternative HTML version deleted]]
    
    
More information about the R-help
mailing list