How it works...
The lmer function can estimate a model using Maximum Likelihood (ML) or Restricted Maximum Likelihood (REML). ML yields biased estimates for the variance components (the variances for our random effects) but can be used for comparing results between different models that contain different fixed effects formulations (the usual case). REML provides unbiased estimates for the variance components, but can't be used for comparing between different models. By default, lmer uses REML, which can be changed via REML = FALSE.
ML estimates have a lower variance than REML but are, of course, biased. Nevertheless, the bias disappears as the sample size rises to infinity. That is why ML is preferred when n is large, and REML is preferred ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access