1
$\begingroup$

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?

a1<-glmer(Infected~(1|River),family=binomial,data=covertfrag,REML=FALSE)
Warning message:
extra argument(s) ‘REML’ disregarded 
$\endgroup$
  • 4
    $\begingroup$ 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... $\endgroup$ – Patrick Coulombe Aug 27 '14 at 18:11
  • $\begingroup$ @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. $\endgroup$ – Scortchi - Reinstate Monica Aug 28 '14 at 8:44
8
$\begingroup$

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

Function 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.

$\endgroup$
  • $\begingroup$ Thanks. But what other argument can I use with glmer to fit the model with REML since this one doesn't work? $\endgroup$ – Ines Aug 27 '14 at 15:57
  • $\begingroup$ I don't know what REML means. You should read the lme4 documentation for an understanding of what options are available for its functions. $\endgroup$ – Sycorax says Reinstate Monica Aug 27 '14 at 15:59
  • 3
    $\begingroup$ @lnes, glmer() always uses Maximum Likelihood (ML) rather than REstricted Maximum Likelihood (REML), see here. $\endgroup$ – Randel Aug 27 '14 at 16:08
  • 1
    $\begingroup$ If you're concerned about restricting the range of plausible parameter estimates in a hierarchical model, I would recommend using a package like stan. $\endgroup$ – Sycorax says Reinstate Monica Aug 27 '14 at 16:11
  • 1
    $\begingroup$ 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. $\endgroup$ – Patrick Coulombe Aug 27 '14 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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