Fitting Linear Mixed-Effects Models using lme4
On this page
Maximum likelihood or restricted maximum likelihood (REML) estimates of theparameters in linear mixed-effects models can be determined using the lmerfunction in the lme4 package for R. As for most model-fitting functions in R,the model is described in an lmer call by a formula, in this case includingboth fixed- and random-effects terms. The formula and data together determine anumerical representation of the model from which the profiled deviance or theprofiled REML criterion can be evaluated as a function of some of the modelparameters. The appropriate criterion is optimized, using one of theconstrained optimization functions in R, to provide the parameter estimates. Wedescribe the structure of the model, the steps in evaluating the profileddeviance or REML criterion, and the structure of classes or types thatrepresents such a model. Sufficient detail is included to allow specializationof these structures by users who wish to write functions to fit specializedlinear mixed models, such as models incorporating pedigrees or smoothingsplines, that are not easily expressible in the formula language used by lmer.
Further reading
- Access Paper in arXiv.org