Skip to main content
main-content
Top

Table of Contents

Frontmatter

Linear Mixed-Effects Models

Frontmatter

1. Linear Mixed-Effects Models: Basic Concepts and Examples

Without Abstract

2. Theory and Computational Methods for Linear Mixed-Effects Models

Without Abstract

3. Describing the Structure of Grouped Data

Chapter Summary
In this chapter we have shown examples of constructing, summarizing, and graphically displaying grouped Data objects. These objects include the data, stored as a data frame, and a formula that designates different variables as a response, a primary covariate, and as one or more grouping factors. Other variables can be designated as outer or inner factors relative to the grouping factors. Accessor or extractor functions are available to extract either the formula for these variables or the value of these variables.
Informative and visually appealing trellis graphics displays of the data can be quickly and easily generated from the information that is stored with the data. The regular data summary functions in S can be applied to the data as well as the gsummary and gapply functions that are especially designed for these data.
Informative plots and summaries of the data are very useful for the preliminary phase of the statistical analysis. Many important features of the data are identified at this stage, but usually one is interested in going a step further in the analysis and fitting parametric models, such as the linear mixed-effects models described in the next chapter.

4. Fitting Linear Mixed-Effects Models

Chapter Summary
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[y i |b i ] is relaxed in Chapter 8, when nonlinear mixed-effects models are described.

5. Extending the Basic Linear Mixed-Effects Model

Chapter Summary
In this chapter the linear mixed-effects model of Chapters 2 and 4 is extended to include heteroscedastic, correlated within-group errors. We show how the estimation and computational methods of Chapter 2 can be extended to this more general linear mixed-effects model. We introduce several classes of variance functions to characterize heteroscedasticity and several classes of correlation structures to represent serial and spatial correlation, and describe how variance functions and correlations structures can be combined to flexibly model the within-group variance-covariance structure.
We illustrate, through several examples, how the lme function is used to fit the extended linear mixed-effects model and describe a suite of S classes and methods to implement variance functions (varFunc) and correlation structures (corStruct). Any of these classes, or others defined by users, can be used with lme to fit extended linear mixed-effects models. An extended linear model with heteroscedastic, correlated errors is introduced and a new modeling function to fit it, gls, is described. This extended linear model can be thought of as an extended linear mixed-effects model with no random effects, and any of the varFunc and corStruct classes available with lme can also be used with gls. Several examples are used the illustrate the use of gls and its associated methods.

Nonlinear Mixed-Effects Models

Frontmatter

6. Nonlinear Mixed-effects Models: Basic Concepts and Motivating Examples

Chapter Summary
This chapter gives an introductory overview of the nonlinear mixed-effects model, describing its basic concepts and assumptions and relating it to the linear mixed-effects model described in the first part of the book. Real-life examples from pharmacokinetics studies and an agricultural experiment are used to illustrate the use of the nlme function in S, and its associated methods, for fitting and analyzing NLME models.
The many similarities between NLME and LME models allow most of the lme methods defined in the first part of the book to also be used with the nlme objects introduced in this section. There are, however, important differences between the two models, and the methods used to fit them, which translate into more complex estimation algorithms and less accurate inference for NLME models.
The purpose of this chapter is to present the motivation for using NLME models with grouped data and to set the stage for the following two chapters in the book, dealing with the theory and computational methods for NLME models (Chapter 7) and the nonlinear modeling facilities in the nlme library (Chapter 8).

7. Theory and Computational Methods for Nonlinear Mixed-Effects Models

Chapter Summary
This chapter presents the theoretical foundations of the nonlinear mixed-effects model for single- and multilevel grouped data, including the general model formulation and its underlying distributional assumptions. Efficient computational methods for maximum likelihood estimation in the NLME model are described and discussed. Different approximations to the NLME model log-likelihood with varying degrees of accuracy and computational complexity are derived.
The basic NLME model with independent, homoscedastic within-group errors is extended to allow correlated, heteroscedastic within-group errors and efficient computational methods are described for maximum likelihood estimation of its parameters.
An extended class of nonlinear regression models, with correlated and heteroscedastic errors, but with no random effects, is presented. An efficient maximum likelihood estimation algorithm is described and approximate inference results for the parameters in this extended nonlinear regression are presented.

8. Fitting Nonlinear Mixed-Effects Models

Chapter Summary
This chapter describes the nonlinear modeling capabilities available in the nlme library. A brief review of the nonlinear least-squares function nls in S is presented and self-starting models for automatically producing starting values for the coefficients in a nonlinear model are introduced and illustrated. The nlsList function for fitting separate nonlinear regression models to data partitioned according to the levels of a grouping factor is described and its use for model building of nonlinear mixed-effects models illustrated.
Nonlinear mixed-effects models are fitted with the nlme function. Data from several real-life applications are used to illustrate the various capabilities available in nlme for fitting and analyzing single and multilevel NLME models. Variance functions and correlation structures to model the within group variance-covariance structure are used with nlme in the exact same way as with lme, the linear mixed-effects modeling function. Several examples are used to illustrate the use of varFunc and corStruct classes with nlme.
A new modeling function, gnls, for fitting the extended nonlinear model with heteroscedastic, correlated errors is introduced. The gnls function can be regarded as an extended version of nls which allows the use of varFunc and corStruct objects to model the error variance-covariance structure, or as a simplified version of nlme, without random effects. The hemodialyzer example is used to illustrate the use of gnls and its associated methods.

Backmatter

Additional information