Take the 2-minute tour ×
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.

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 
share|improve this question
4  
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 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 at 8:44

1 Answer 1

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 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. –  user777 Aug 27 at 15:59
3  
@lnes, glmer() always uses Maximum Likelihood (ML) rather than REstricted Maximum Likelihood (REML), see here. –  Randel Aug 27 at 16:08
1  
If you're concerned about restricting the range of plausible parameter estimates in a hierarchical model, I would recommend using a package like stan. –  user777 Aug 27 at 16:11
1  
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 at 18:06

Your Answer

 
discard

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.