forcing uncorrelated random effects
Here is an example. The second has no correlation. (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (fm2 <- lmer(Reaction ~ Days + (Days - 1|Subject), sleepstudy))
I don't think that's the correct answer. Model fm2 is also lacking a random intercept:
summary(fm2)
Linear mixed model fit by REML
Formula: Reaction ~ Days + (Days - 1 | Subject)
Data: sleepstudy
AIC BIC logLik deviance REMLdev
1775 1787 -883.3 1774 1767
Random effects:
Groups Name Variance Std.Dev.
Subject Days 52.708 7.260
Residual 842.030 29.018
Number of obs: 180, groups: Subject, 18
Fixed effects:
Estimate Std. Error t value
(Intercept) 251.405 4.020 62.54
Days 10.467 1.869 5.60
Correlation of Fixed Effects:
(Intr)
Days -0.340
Compare this to the answer by Daniel Johnson:
(fm2 <- lmer(Reaction ~ Days + (0+Days|Subject) + (1|Subject), sleepstudy))
Linear mixed model fit by REML
Formula: Reaction ~ Days + (0 + Days | Subject) + (1 | Subject)
Data: sleepstudy
AIC BIC logLik deviance REMLdev
1754 1770 -871.8 1752 1744
Random effects:
Groups Name Variance Std.Dev.
Subject Days 35.858 5.9882
Subject (Intercept) 627.568 25.0513
Residual 653.584 25.5653
Number of obs: 180, groups: Subject, 18
Fixed effects:
Estimate Std. Error t value
(Intercept) 251.405 6.885 36.52
Days 10.467 1.560 6.71
Correlation of Fixed Effects:
(Intr)
Days -0.184
Claus Wilke Section of Integrative Biology and Center for Computational Biology and Bioinformatics University of Texas at Austin 1 University Station C0930 Austin, TX 78712 cwilke at mail.utexas.edu 512 471 6028