Others have summarized the differences very well. My impression is that lme4
is more suited for clustered data sets especially when you need to use crossed random effects. For repeated measures designs (including many longitudinal designs) however, nlme
is the tool since only nlme
supports specifying a correlation structure for the residuals. You do it using the correlations
or cor
argument with a corStruct
object. It also allows you to model heteroscedasticity using a varFunc
object.
AlefSin
- 1k
- 8
- 13