Fitting Linear Mixed-Effects Models
This chapter describes the capabilities available in the nlme library for fitting and analyzing linear mixed-effects models with uncorrelated, homoscedastic within-group errors. The lme function, for fitting linear mixede ffects models, is described in detail and its various capabilities and associated methods are illustrated through the analyses of several real data examples, covering single-level models, multilevel nested models, and models with crossed random effects.
The model-building approach developed in this chapter follows an “insideout” strategy, using individual lm fits, obtained with the lmList function, to construct more sophisticated linear mixed-effects models. A rich, integrated suite of diagnostic plots to assess model assumptions is described and illustrated through examples.
The class of mixed-effects models which can be fit with lme is greatly extended by the availability of patterned random-effects variance-covariance structures. These are implemented in S through pdMat classes, which can be extended with user defined classes.
The linear mixed-effects model considered in this chapter is extended in two different ways later in the book. In Chapter 5, the assumption of uncorrelated, homoscedastic within-group errors is relaxed, and variance functions and correlation structures are introduced the model heteroscedasticity and within-group dependence. The assumption of linearity for E[yi|bi] is relaxed in Chapter 8, when nonlinear mixed-effects models are described.
Unable to display preview. Download preview PDF.