Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to fit a model with the function glmer (lmer4 1.1-7 package) in R using REML but I just get an error saying extra argument(s) ‘REML’ disregarded (see below). How else can I fit it with REML to optimize the random effects structure with this package?

Warning message:
extra argument(s) ‘REML’ disregarded 
share|improve this question
I don't understand why this question is upvoted so much while good statistical ones go under the radar. This question is about a software error because of a user mis-usage... – Patrick Coulombe Aug 27 '14 at 18:11
@Patrick: On the face of it, but there's an underlying statistical question: How do you (does it make sense to) fit a non-Gaussian generalized linear mixed model using restricted maximum likelihood? IMO it'd be better to address that in the answers rather than close the question. – Scortchi Aug 28 '14 at 8:44

Function glmer does not take argument REML, so the glmer call ignores it. The warning is telling you that is the case.

Finction glmer always uses Maximum Likelihood (ML) rather than REstricted Maximum Likelihood (REML); see the GLMM FAQ for more detailed information. Only function lmer can take argument REML, and it must be a logical vector.

To check what arguments the function glmer can take, type ?glmer. Or to see the whole function, type glmer without parenthesis and it will print to the console.

share|improve this answer
Thanks. But what other argument can I use with glmer to fit the model with REML since this one doesn't work? – Ines Aug 27 '14 at 15:57
I don't know what REML means. You should read the lme4 documentation for an understanding of what options are available for its functions. – General Abrial Aug 27 '14 at 15:59
@lnes, glmer() always uses Maximum Likelihood (ML) rather than REstricted Maximum Likelihood (REML), see here. – Randel Aug 27 '14 at 16:08
If you're concerned about restricting the range of plausible parameter estimates in a hierarchical model, I would recommend using a package like stan. – General Abrial Aug 27 '14 at 16:11
Just a clarification: The function lmer doesn't have a method argument--this is in the lme function of the nlme package. The argument is REML (TRUE or FALSE) in function lme4::lmer. – Patrick Coulombe Aug 27 '14 at 18:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.