Mixed-effects models are commonly employed in the analysis of grouped or clustered data, where observations in a cluster cannot reasonably be assumed to independent of one-another. In this appendix, we explain how to use the lme function in the nlme package and the lmer function in the lme4 package to fit linear mixed-effects models to hierarchical and longitudinal data. In the first instance, individuals are clustered into higher-level units (such as students within schools); in the second instance repeated observations are taken on individuals, who define the clusters. We also describe the use of the glmer function in the lme4 package for fitting generalized linear mixed-effects models, and the nlme function in the nlme package for fitting nonlinear mixed-effects models..
CITATION STYLE
Mixed Effects Models. (2006). In Applied Regression Analysis (pp. 573–592). Springer-Verlag. https://doi.org/10.1007/0-387-22753-9_18
Mendeley helps you to discover research relevant for your work.