23 Jun 2014 | Douglas Bates, Martin Mächler, Benjamin M. Bolker, Steven C. Walker
The lme4 package in R provides functions for fitting linear mixed-effects models, generalized linear mixed models, and nonlinear mixed models. These models incorporate both fixed- and random-effects terms in a linear predictor expression. The lmer function uses a formula to describe the model, including both fixed and random effects. The formula and data together determine a numerical representation of the model, which is then used to evaluate the profiled deviance or REML criterion as a function of model parameters. The appropriate criterion is optimized using constrained optimization functions in R to provide parameter estimates. The paper describes the structure of the model, the steps in evaluating the profiled deviance or REML criterion, and the structure of classes that represent such models. It also discusses the use of sparse matrix methods, linear mixed models, penalized least squares, and Cholesky decomposition. The paper contrasts the approach used by lme4 with previous formulations of mixed models and describes the reformulation of the model for improved computational stability. The paper also discusses the penalized least squares algorithm, the REML criterion, and the changes relative to previous formulations. The paper concludes with a discussion of the modular structure of lme4 and its use in fitting linear mixed models.The lme4 package in R provides functions for fitting linear mixed-effects models, generalized linear mixed models, and nonlinear mixed models. These models incorporate both fixed- and random-effects terms in a linear predictor expression. The lmer function uses a formula to describe the model, including both fixed and random effects. The formula and data together determine a numerical representation of the model, which is then used to evaluate the profiled deviance or REML criterion as a function of model parameters. The appropriate criterion is optimized using constrained optimization functions in R to provide parameter estimates. The paper describes the structure of the model, the steps in evaluating the profiled deviance or REML criterion, and the structure of classes that represent such models. It also discusses the use of sparse matrix methods, linear mixed models, penalized least squares, and Cholesky decomposition. The paper contrasts the approach used by lme4 with previous formulations of mixed models and describes the reformulation of the model for improved computational stability. The paper also discusses the penalized least squares algorithm, the REML criterion, and the changes relative to previous formulations. The paper concludes with a discussion of the modular structure of lme4 and its use in fitting linear mixed models.