Fitting Linear Mixed-Effects Models Using lme4
Open accessThe DOI matches its Crossref record; 44 of the 45 references it cites were found in a registry or an index.
Abstract
Maximum likelihood or restricted maximum likelihood (REML) estimates of the parameters in linear mixed-effects models can be determined using the lmer function 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 including both fixed- and random-effects terms. The formula and data together determine a numerical representation of the model from which the profiled deviance or the profiled REML criterion can be evaluated as a function of some of the model parameters. The appropriate criterion is optimized, using one of the constrained optimization functions in R, to provide the parameter estimates. We describe the structure of the model, the steps in evaluating the profiled deviance or REML criterion, and the structure of classes or types that represents such a model. Sufficient detail is included to allow specialization of these structures by users who wish to write functions to fit specialized linear mixed models, such as models incorporating pedigrees or smoothing splines, that are not easily expressible in the formula language used by lmer.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“The algorithm then produces warnings for singular fits while seeking a solution to the model, indicating that the random effect variance-covariance matrix has been estimated as exactly zero [30].”
From Evaluation of the type I error rate when using parametric bootstrap analysis of a cluster randomized controlled trial with binary outcomes and a small number of clusters (2022) · cites this paper as [30]
Experimental — accuracy not yet measuredIn the citing paper
“The missing values in the dataset were handled via Full Information Maximum Likelihood (FIML) estimation implemented in the lme4 package version 1.1.33 (57) in R.”
From Reducing neuroendocrine psychosocial stress response through socio-emotional dyadic but not mindfulness online training (2024) · cites this paper as [57]
In the citing paper
“but this quasi-likelihood method is not available in the mixed-effects package lme4 in R (Bates et al., 2015).”
From Violating the normality assumption may be the lesser of two evils (2021) · cites this paper as Bates et al., 2015
In the citing paper
“We fitted linear mixed models using the R package ‘lme4’ version 1.1–36 [36] to analyse each variable. The model used to analyse blood variables included calf age (Young = 2–3 weeks, Old = 4–5 weeks), pre-transport feeding protocol (2 L, 4 L), time point (AC, lairage, arrival, Day 7), and all corresponding two- and three-way interactions as fixed effects, and BW before transport as a continuous”
From Effects of age and feeding protocols on the metabolic and physiological condition of unweaned calves during and after long-distance transport (2026) · cites this paper as [36]
In the citing paper
“To account for intrasite correlations in the outcome measures, mixed-effect logistic regression models were run using the”
From Comparison of the Safety Planning Intervention With Follow-up vs Usual Care of Suicidal Patients Treated in the Emergency Department (2018) · cites this paper as [41]
4 more claims about this paper
Create a free account to see every claim other papers make about this one.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
R: A Language and Environment for Statistical Computing
R Core Team (2025) · doi:10.32614/r.manuals · Cited by 352,181
Gelman, A., Carlin, J. B., Stern, H. S., & Rubin, D. B. (2003) · doi:10.1201/9780429258480 · Cited by 27,276
Axelrod, R., & Hamilton, W. D. (1981) · Science · doi:10.1126/science.7466396 · Cited by 20,065
Data Analysis Using Regression and Multilevel/Hierarchical Models
Gelman, A., & Hill, J. (2006) · doi:10.1017/cbo9780511790942 · Cited by 13,597
nlme : Linear and nonlinear mixed effects models
DebRoy, S. (2006) · Medical Entomology and Zoology · Cited by 10,009
Mixed-Effects Models in S and S-PLUS
(2001) · Technometrics · doi:10.1198/tech.2001.s574 · Cited by 9,278 · cited 1×
“, Cook’s distance and leverage plots), in a way modeled on the diagnostic graphics of nlme (Pinheiro and Bates 2000).”
MethodSelf-citationRandom-Effects Models for Longitudinal Data
Laird, N. M., & Ware, J. H. (1982) · Biometrics · doi:10.2307/2529876 · Cited by 8,923 · cited 3×
“The REML criterion The REML criterion can be obtained by integrating the marginal density for Y with respect to the fixed effects (Laird and Ware 1982), ∫ fY(yobs)dβ = ♣W ♣1/2♣Lθ♣ −1 (2πσ2)n/2 exp −r2(θ) 2σ2 ] ∫ exp − ∥∥∥RX(β − β̂θ) ∥∥∥ 2 2σ2 dβ, (36) Douglas Bates, Martin Mächler, Ben Bolker,…”
Methodnlme: Linear and Nonlinear Mixed Effects Models
Pinheiro, J., R Core Team, & Bates, D. (1999) · CRAN: Contributed Packages · doi:10.32614/cran.package.nlme · Cited by 6,849
Self-citationLinear Mixed-Effects Models using 'Eigen' and S4
Bates, D. M., Maechler, M., Bolker, B. M., & Walker, S. C. (2015) · Cited by 5,924
Self-citationBootstrap Methods and Their Application
Loughin, T. M., Davison, A. C., & Hinkley, D. V. (1999) · Journal of the American Statistical Association · doi:10.2307/2669707 · Cited by 5,418
Research works printed but not linked: 2
- Khatri CG, Rao CR (1968). 'Solutions to Some Functional Equations and Their Applications to Characterization of Probability Distributions.' Sankhy¯ a: The Indian Journal of Statistics A , 30 (2), 167-180.
- Sánchez-Espigares JA, Ocaña J (2009). 'An R Implementation of Bootstrap Procedures for Mixed Models.' Conference presentation, use R ! Accessed 2014-05-25, URL http://www. R-project.org/conferences/useR-2009/slides/SanchezEspigares+Ocana.pdf .
Cited by
lmerTest Package: Tests in Linear Mixed Effects Models
Kuznetsova, A., Brockhoff, P. B., & Christensen, R. H. B. (2017) · Journal of Statistical Software · doi:10.18637/jss.v082.i13 · Cited by 24,346
Brooks, M., Kristensen, K., Benthem, K., Magnusson, A., Berg, C., Nielsen, A., Skaug, H., Mächler, M., & Bolker, B. (2017) · The R Journal · doi:10.32614/rj-2017-066 · Cited by 12,915
Self-citationbrms : An R Package for Bayesian Multilevel Models Using Stan
Bürkner, P.-C. (2017) · Journal of Statistical Software · doi:10.18637/jss.v080.i01 · Cited by 9,476
“These are lme4 (Bates et al. 2015) and MCMCglmm (HadĄeld 2010), which are possibly the most general and widely applied R packages for MLMs, as well as rstanarm (Gabry and Goodrich 2016) and rethinking (McElreath 2016), which are both based on Stan .”
MethodMeasuring individual differences in implicit cognition: the implicit association test
Greenwald, A. G., McGhee, D. E., & Schwartz, J. L. K. (1998) · Journal of Personality and Social Psychology · doi:10.1037/0022-3514.74.6.1464 · Cited by 9,210
Korber, B., Fischer, W. M., Gnanakaran, S., Yoon, H., Theiler, J., Abfalterer, W., Hengartner, N., Giorgi, E. E., Bhattacharya, T., Foley, B., et al. (2020) · Cell · doi:10.1016/j.cell.2020.06.043 · Cited by 4,281
Metadata
- Authors
- Bates, D., Mächler, M., Bolker, B., & Walker, S.
- Affiliations
- University of Wisconsin–Madison (US)
- McMaster University (CA)
- ORCID
- Bates, Douglas
- Venue
- Journal of Statistical Software
- Publisher
- Foundation for Open Access Statistic
- Published
- 2015
- Volume
- 67
- Issue
- 1
- ISSN
- 1548-7660 (ISSN-L)
- OpenAlex
- W1951724000
- Semantic Scholar
- 9b536c7b0f45d4b512f337d0acda09ca3e4cd953
- Cited by
- 86,835
- References
- 45
- Citations by year
- 2026: 10461 · 2025: 11380 · 2024: 10196 · 2023: 9312 · 2022: 9081 · 2021: 10068 · 2020: 8217 · 2019: 6640 · 2018: 5292 · 2017: 3727 · 2016: 1898 · 2015: 397
- FWCI
- 3357.47
- Type
- journal article
- Language
- en
- Open access
- diamond
- doi.org
- Licence
- cc-by
- Locations
- Journal of Statistical Software (publishedVersion, cc-by)
- DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
- Funders
- National Science Foundation (1253676, 1144152)
- Banff International Research Station for Mathematical Innovation and Discovery
- Natural Sciences and Engineering Research Council of Canada
- Japan Society for the Promotion of Science (15F15048)
- Topics
- Physical Sciences › Mathematics › Statistics and Probability › Statistical Methods and Bayesian Inference
- Physical Sciences › Mathematics › Statistics and Probability › Data Analysis with R
- Physical Sciences › Mathematics › Statistics and Probability › Advanced Statistical Methods and Models
- Keywords
- linear mixed models, lme4, restricted maximum likelihood, maximum likelihood estimation, random effects, fixed effects, constrained optimization, R package
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.