I Linear Mixed-Effects Models 1
1 Linear Mixed-Effects Models 3
1.1 A Simple Example of Random Effects . . . . . . . . . . . . 4
1.1.1 Fitting the Random-Effects Model With lme . . . . 8
1.1.2 Assessing the FittedModel . . . . . . . . . . . . . . 11
1.2 A Randomized Block Design . . . . . . . . . . . . . . . . . 12
1.2.1 Choosing Contrasts for Fixed-Effects Terms . . . . . 14
1.2.2 Examining theModel . . . . . . . . . . . . . . . . . 19
1.3 Mixed-Effects Models for Replicated, Blocked Designs . . . 21
1.3.1 Fitting Random Interaction Terms . . . . . . . . . . 23
1.3.2 Unbalanced Data . . . . . . . . . . . . . . . . . . . . 25
1.3.3 More General Models for the Random Interaction
Effects . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.4 An Analysis of CovarianceModel . . . . . . . . . . . . . . . 30
1.4.1 Modeling Simple Linear Growth Curves . . . . . . . 30
1.4.2 Predictions of the Response and the Random Effects 37
1.5 Models for Nested Classification Factors . . . . . . . . . . . 40
1.5.1 Model Building forMultilevelModels . . . . . . . . 44
1.6 A Split-Plot Experiment . . . . . . . . . . . . . . . . . . . . 45
1.7 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 52
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
xii Contents
2 Theory and Computational Methods for LME Models 57
2.1 The LMEModel Formulation . . . . . . . . . . . . . . . . . 58
2.1.1 Single Level of Grouping . . . . . . . . . . . . . . . . 58
2.1.2 AMultilevel LMEModel . . . . . . . . . . . . . . . 60
2.2 Likelihood Estimation for LMEModels . . . . . . . . . . . 62
2.2.1 The Single-Level LME Likelihood Function . . . . . 62
2.2.2 Orthogonal-Triangular Decompositions . . . . . . . . 66
2.2.3 Evaluating the Likelihood Through Decompositions 68
2.2.4 Components of the Profiled Log-Likelihood . . . . . 71
2.2.5 Restricted Likelihood Estimation . . . . . . . . . . . 75
2.2.6 Multiple Levels of Random Effects . . . . . . . . . . 77
2.2.7 Parameterizing Relative Precision Factors . . . . . . 78
2.2.8 Optimization Algorithms . . . . . . . . . . . . . . . 79
2.3 Approximate Distributions . . . . . . . . . . . . . . . . . . . 81
2.4 Hypothesis Tests and Confidence Intervals . . . . . . . . . . 82
2.4.1 Likelihood Ratio Tests . . . . . . . . . . . . . . . . . 83
2.4.2 Hypothesis Tests for Fixed-Effects Terms . . . . . . 87
2.4.3 Confidence Intervals . . . . . . . . . . . . . . . . . . 92
2.5 Fitted Values and Predictions . . . . . . . . . . . . . . . . . 94
2.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 94
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3 Describing the Structure of Grouped Data 97
3.1 The Display Formula and Its Components . . . . . . . . . . 97
3.2 Constructing groupedData Objects . . . . . . . . . . . . . . 101
3.2.1 Roles of Other Experimental or Blocking Factors . . 104
3.2.2 Constructors for Balanced Data . . . . . . . . . . . . 108
3.3 Controlling Trellis Graphics Presentations of Grouped Data 110
3.3.1 Layout of the Trellis Plot . . . . . . . . . . . . . . . 110
3.3.2 Modifying the Vertical and Horizontal Scales . . . . 113
3.3.3 Modifying the Panel Function . . . . . . . . . . . . . 114
3.3.4 Plots ofMultiply-Nested Data . . . . . . . . . . . . 116
3.4 Summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
3.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 130
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
4 Fitting Linear Mixed-Effects Models 133
4.1 Fitting Linear Models in S with lm and lmList . . . . . . . 134
4.1.1 The lmList Function . . . . . . . . . . . . . . . . . 139
4.2 Fitting Linear Mixed-Effects Models with lme . . . . . . . . 146
4.2.1 Fitting Single-LevelModels . . . . . . . . . . . . . . 146
4.2.2 Patterned Variance–Covariance Matrices for the
Random Effects: The pdMat Classes . . . . . . . . . 157
4.2.3 FittingMultilevelModels . . . . . . . . . . . . . . . 167
4.3 Examining a FittedModel . . . . . . . . . . . . . . . . . . . 174
Contents xiii
4.3.1 Assessing Assumptions on the Within-Group Error . 174
4.3.2 Assessing Assumptions on the Random Effects . . . 187
4.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 196
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
5 Extending the Basic Linear Mixed-Effects Model 201
5.1 General Formulation of the ExtendedModel . . . . . . . . . 202
5.1.1 Estimation and Computational Methods . . . . . . . 202
5.1.2 The GLS model . . . . . . . . . . . . . . . . . . . . . 203
5.1.3 Decomposing the Within-Group Variance–Covariance
Structure . . . . . . . . . . . . . . . . . . . . . . . . 205
5.2 Variance Functions forModeling Heteroscedasticity . . . . . 206
5.2.1 varFunc classes in nlme . . . . . . . . . . . . . . . . 208
5.2.2 Using varFunc classes with lme . . . . . . . . . . . . 214
5.3 Correlation Structures for Modeling Dependence . . . . . . 226
5.3.1 Serial Correlation Structures . . . . . . . . . . . . . 226
5.3.2 Spatial Correlation Structures . . . . . . . . . . . . . 230
5.3.3 corStruct classes in nlme . . . . . . . . . . . . . . . 232
5.3.4 Using corStruct Classes with lme . . . . . . . . . . 239
5.4 Fitting Extended Linear Models with gls . . . . . . . . . . 249
5.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 266
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
II Nonlinear Mixed-Effects Models 271
6 NLME Models: Basic Concepts and Motivating
Examples 273
6.1 LMEModels vs. NLMEModels . . . . . . . . . . . . . . . . 273
6.2 Indomethicin Kinetics . . . . . . . . . . . . . . . . . . . . . 277
6.3 Growth of Soybean Plants . . . . . . . . . . . . . . . . . . . 287
6.4 Clinical Study of Phenobarbital Kinetics . . . . . . . . . . . 294
6.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 300
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
7 Theory and Computational Methods for NLME Models 305
7.1 The NLMEModel Formulation . . . . . . . . . . . . . . . . 306
7.1.1 Single-Level of Grouping . . . . . . . . . . . . . . . . 306
7.1.2 Multilevel NLMEModels . . . . . . . . . . . . . . . 309
7.1.3 Other NLMEModels . . . . . . . . . . . . . . . . . . 310
7.2 Estimation and Inference in NLMEModels . . . . . . . . . 312
7.2.1 Likelihood Estimation . . . . . . . . . . . . . . . . . 312
7.2.2 Inference and Predictions . . . . . . . . . . . . . . . 322
7.3 Computational Methods . . . . . . . . . . . . . . . . . . . . 324
7.4 Extending the Basic NLMEModel . . . . . . . . . . . . . . 328
xiv Contents
7.4.1 Generalmodel formulation . . . . . . . . . . . . . . 328
7.4.2 Estimation and Computational Methods . . . . . . . 329
7.5 An Extended Nonlinear RegressionModel . . . . . . . . . . 332
7.5.1 GeneralModel Formulation . . . . . . . . . . . . . . 333
7.5.2 Estimation and Computational Methods . . . . . . . 334
7.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . 336
8 Fitting Nonlinear Mixed-Effects Models 337
8.1 Fitting Nonlinear Models in S with nls and nlsList . . . . 338
8.1.1 Using the nls Function . . . . . . . . . . . . . . . . 338
8.1.2 Self-Starting NonlinearModel Functions . . . . . . . 342
8.1.3 Separate Nonlinear Fits by Group: The nlsList
Function . . . . . . . . . . . . . . . . . . . . . . . . . 347
8.2 Fitting Nonlinear Mixed-Effects Models with nlme . . . . . 354
8.2.1 Fitting Single-Level nlmeModels . . . . . . . . . . . 354
8.2.2 Using Covariates with nlme . . . . . . . . . . . . . . 365
8.2.3 Fitting Multilevel nlmeModels . . . . . . . . . . . . 385
8.3 Extending the Basic nlmeModel . . . . . . . . . . . . . . . 391
8.3.1 Variance Functions in nlme . . . . . . . . . . . . . . 391
8.3.2 Correlation Structures in nlme . . . . . . . . . . . . 395
8.3.3 Fitting Extended Nonlinear Regression Models
with gnls . . . . . . . . . . . . . . . . . . . . . . . . 401
8.4 Chapter Summary . . . . . . . . . . . . . . . . . . . .