Skip to main content
main-content

Über dieses Buch

Linear mixed-effects models (LMMs) are an important class of statistical models that can be used to analyze correlated data. Such data are encountered in a variety of fields including biostatistics, public health, psychometrics, educational measurement, and sociology. This book aims to support a wide range of uses for the models by applied researchers in those and other fields by providing state-of-the-art descriptions of the implementation of LMMs in R. To help readers to get familiar with the features of the models and the details of carrying them out in R, the book includes a review of the most important theoretical concepts of the models. The presentation connects theory, software and applications. It is built up incrementally, starting with a summary of the concepts underlying simpler classes of linear models like the classical regression model, and carrying them forward to LMMs. A similar step-by-step approach is used to describe the R tools for LMMs. All the classes of linear models presented in the book are illustrated using real-life data. The book also introduces several novel R tools for LMMs, including new class of variance-covariance structure for random-effects, methods for influence diagnostics and for power calculations. They are included into an R package that should assist the readers in applying these and other methods presented in this text.

Inhaltsverzeichnis

Frontmatter

Introduction

Frontmatter

Chapter 1. Introduction

Abstract
Linear mixed-effects models (LMMs) are powerful modeling tools that allow analyzing datasets with complex, hierarchical structures. Intensive research in the past decade has led to a better understanding of the properties of the models. The growing body of literature, including recent monographs, has considerably increased popularity of LMMs among applied researchers. The goal of our book is to provide a description of tools available for fitting LMMs in R. In our presentation, we focus on functions available in nlme and lme4.0 packages. The description is accompanied by a presentation of the most important theoretical concepts of LMMs and illustrated with real-life examples. In our presentation, which connects theory, software, and applications, we incrementally build up the knowledge about the implementation of LMMs. In particular, in the first step, we introduce many theoretical concepts and their practical implementation in R in the context of simpler classes of linear models (LMs), like the classical linear regression model. The concepts are then carried over to more advanced classes of models, including LMMs. This step-by-step approach offers a couple of advantages. First, we believe that it makes the exposition of the theory and R tools for LMMs simpler and clearer. Second, the step-by-step approach is helpful in the use of other R packages, which rely on classes of objects defined in the nlme and/or lme4.0 packages.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 2. Case Studies

Abstract
In this chapter, we introduce the case studies that will be used to illustrate the models and R code described in the book.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 3. Data Exploration

Abstract
In this chapter, we present the results of exploratory analyses of the case studies introduced in Chap. 2. The results will serve as a basis for building LMs for the data in the following parts of the book.
Andrzej Gałecki, Tomasz Burzykowski

Linear Models for Independent Observations

Frontmatter

Chapter 4. Linear Models with Homogeneous Variance

Abstract
In this chapter, we review the theory of the classical linear models (LMs), suitable to analyze data involving independent observations with a homogeneous variance. In Sects. 4.3 and 4.4, we introduce the specification of the model. Estimation methods are discussed in Sect. 4.4. Section 4.5 offers a review of the diagnostic methods, while in Sect. 4.6, we describe the inferential tools available for the model. In Sect. 4.7, we summarize strategies that can be followed in order to reduce a model or to select one model from a set of several competing ones. The implementation of the theoretical concepts and methods for the classical LMs in R will be discussed in Chap. 5 and illustrated with ARMD data in Chap. 6.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 5. Fitting Linear Models with Homogeneous Variance: The lm() and gls() Functions

Abstract
In Chap.​ 4, we outlined several concepts related to the classical LM. In the current chapter, we review the tools available in R for fitting the model.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 6. ARMD Trial: Linear Model with Homogeneous Variance

Abstract
In this chapter, we illustrate the use of the R tools, described in Sects. 5.2–5.5.We apply them to fit an LM with independent, homoscedastic residual errors to the visual acuity measurements from the ARMD dataset. Note that the model is considered for software illustration purposes only. In view of the structure of the data and of the results of the exploratory analysis presented in Sect. 3.2, the assumptions of the independence and homoscedasticity of the visual acuity measurements are not correct. More advanced LMs, which properly take into account the structure of the data and do not require these assumptions, will be presented in Chaps. 12 and 16.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 7. Linear Models with Heterogeneous Variance

Abstract
In Chap. 4, we formulated the classical LM for independent observations. The key assumptions underlying the model are that the observations are independent and normally distributed with a constant, i.e., homogeneous variance, and that the expected value of the observations can be expressed as a linear function of covariates.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 8. Fitting Linear Models with Heterogeneous Variance: The gls() Function

Abstract
In Chap.​ 7, we introduced several concepts related to the LM for independent, normally distributed observations with heterogeneous variance. Compared to the classical LM (Chap.​ 4), the formulation of the model included a new component, namely, the variance function, which is used to take into account heteroscedasticity of the dependent variable.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 9. ARMD Trial: Linear Model with Heterogeneous Variance

Abstract
In this chapter, we continue with the analysis of the visual acuity measurements collected in the ARMD trial. For illustrative purposes, in Chap.​6 we considered LMs with independent, homoscedastic residual errors.
Andrzej Gałecki, Tomasz Burzykowski

Linear Fixed-effects Models for Correlated Data

Chapter 10. Linear Model with Fixed Effects and Correlated Errors

Abstract
The essential assumption for the LMs considered in Part II of the book was that the observations collected during the study were independent of each other. This assumption is restrictive in studies which use sampling designs that lead to correlated data. Such data result, for example, from studies collecting measures over time, i.e., in a longitudinal fashion; in designs which involve clustering or grouping, e.g., cluster-randomization clinical trials; in studies collecting spatially correlated data, etc. Note that, in contrast to Part II, for such designs, the distinction between sampling units (e.g., subjects in a longitudinal study) and analysis units (e.g., time-specific measurements) is important
Andrzej Gałecki, Tomasz Burzykowski

Chapter 11. Fitting Linear Models with Fixed Effects and Correlated Errors: The gls() Function

Abstract
In Chap.​ 10, we summarized the main concepts underlying the construction of the LM with fixed effects and correlated residual errors for normally distributed, grouped data. An important component of the model is the correlation function, which is used to take into account the correlation between the observations belonging to the same group.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 12. ARMD Trial: Modeling Correlated Errors for Visual Acuity

Abstract
In Chap. 9, we analyzed the ARMD data using a model that assumed independence between repeated measurements of visual acuity for an individual patient. Given the longitudinal study design, in which sampling units, i.e., subjects, are differentfrom the units of analysis, i.e., visual acuity measurements, the assumption of independence typically does not hold. This consideration is confirmed by the results of the exploratory analysis presented in Sect.3.2, which indicate that the assumption is clearly not fulfilled. Thus, in the current chapter, we further modify our analysis to account for the correlation between the repeated measurements. In particular, we use LMs with fixed effects and correlated residual errors, defined in Sect.10.2.
Andrzej Gałecki, Tomasz Burzykowski

Linear Mixed-effects Models

Chapter 13. Linear Mixed-Effects Model

Abstract
In Chap.10, we presented linear models (LMs) models with fixed effects for correlated data. They are examples of population-averaged models, because their mean-structure parameters can be interpreted as effects of covariates on the mean value of the dependent variable in the entire population. The association between the observations in a dataset was a result of a grouping of the observations sharing the same level of a grouping factor(s). In this chapter, we consider the analysis of continuous, hierarchical data using a different class of models, namely, linear mixed-effects models (LMMs). They allow to take into account the correlation of observations contained in a dataset. Moreover, they allow to effectively partition the overall variation of the dependent variable into components corresponding to different levels of data hierarchy. The models are examples of subject-specific models, because they include subject-specific coefficients. In particular, in Sects.13.213.4, we describe the formulation of the model. Sections13.5,13.6, and13.7 are devoted to, respectively, the estimation approaches, diagnostic tools, and inferential methods used for the LMMs, in which the (conditional) residual variance-covariance matrix is independent of the mean value. This is the most common type of LMMs used in practice. In Sect.13.8, we focus on the LMMs, in which the (conditional) residual variance-covariance matrix depends on the mean value. Section13.9 summarizes the contents of this chapter and offers some general concluding comments.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 14. Fitting Linear Mixed-Effects Models: The lme()Function

Abstract
In Chap. 13 we summarized the main theoretical concepts underlying the construction of LMMs. Compared to the LMs introduced in Chaps. 4, 7, and 10, LMMs allow taking the hierarchical structure of data into account in the analysis. This is achieved by introducing, in addition to the mean (fixed-effects) structure, a randomeffects structure.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 15. Fitting Linear Mixed-Effects Models: The lmer() Function

Abstract
In Chap. 14, we introduced the lme() function from the nlme package. The function is a popular and well-established tool to fit LMMs. It is especially suitable for fitting LMMs to data with hierarchies defined by nested grouping factors.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 16. ARMD Trial: Modeling Visual Acuity

Abstract
In Chap.12, we presented an analysis of the age-related macular degeneration (ARMD) data using LM with fixed effects for correlated data.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 17. PRT Trial: Modeling Muscle Fiber Specific-Force

Abstract
In Sect.3.3, we presented an exploratory analysis of the measurements of muscle fiber isometric- and specific force, collected in the progressive resistance training PRT study. In this chapter, we use LMMs to analyze the data. In particular, we first focus on data for the muscle fiber specific force. In Sect.17.2, we consider type-1 fibers only and fit an LMM with two correlated, heteroscedastic, occasion-specific random effects for each individual and homoscedastic independent residual errors. We subsequently modify the model for residual variation by using the power-of-the-mean variance function (Sect.17.3). In the next step, we consider models for both fiber types. In Sects.17.4 and 17.5, we construct conditional-independence LMMs with four correlated, heteroscedastic, fiber-type ×occasion-specific random effects for each individual. In Sects.17.6 and17.7, the random-effects structure of the models is simplified by considering more parsimonious structures of variance-covariance matrices of the random effects. Toward this end, we develop and use a new pdKronecker class of positive-definite matrices. Finally, in Sect.17.8, we construct the most comprehensive LMM, which takes into account the data for two dependent variables, that is the isometric and specific force, and for both fiber types. A summary of the chapter is presented in Sect.17.9.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 18. SII Project: Modeling Gains in Mathematics Achievement-Scores

Abstract
The SII Project was described in Sect.2.4. In Sect.3.4, an exploratory analysis of the data was presented. The data have a hierarchical structure, with pupils grouped in classes which, in turn, are grouped in schools. Thus, we deal with two levels of grouping in the data or, equivalently, with a three-level data hierarchy. In this chapter, we use LMMs to analyze the change in mathematics achievement-scores for pupils, MATHGAIN. In particular, we use models, which include random intercepts for schools and classes to account for the data hierarchy.
Andrzej Gałecki, Tomasz Burzykowski

Chapter 19. FCAT Study: Modeling Attainment-Target Scores

Abstract
The FCAT study was described in Sect.2.5. An exploratory analysis of the data from the study was presented in Sect.3.5. In this chapter, we use LMMs with crossed random effects to analyze the data. In particular, we consider the models proposed by Tibaldi et al.[2007].
Andrzej Gałecki, Tomasz Burzykowski

Chapter 20. Extensions of theRTools for Linear Mixed-Effects Models

Abstract
In this chapter, we present selected tools and functions introduced in the nlmeU package.
Andrzej Gałecki, Tomasz Burzykowski

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise