I am trying to produce a glmm using the lme4 package in R. To validate my model I would like to produce some diagnostic plots but am having trouble doing so as many of the packages that work for lm() models like CAR do not work for lmer() models. I have tried using the languageR and asuR packages but am just getting errors. I am particularly interested in creating partial residual plots.

I have been able to produce qqplots, residual vs fitted plots and look at cooks distances manually. Any suggestions of further plots I should try or packages that would help would be greatly appreciated.

fm <- lmer(Average.payoff ~ Game + Type + Others.Type + Game*Type + Game*Others.Type +
  Type*Others.Type + (1|Subjects), REML=FALSE, data=Subjectsm1)

Error in .setupMethodsTables(fdef, initialize = TRUE) : 
  no slot of name "group" for this object of class "derivedDefaultMethod"

warning: I don't know how to handle  Game 
Error in preparePredictor.fnc(predictors[i], model, m, ylabel, fun, val = NA,  : 
  object 'dfr' not found

1 Answer 1


Consider fitting your model using the "lme" function of the R-package "nlme" instead. The book "Mixed Effects Models in S and S-Plus" by Pinheiro & Bates contains a thorough description of the functionalities of the package, including a large variety of diagnostic plots.

  • $\begingroup$ Thanks for the suggestion. My model does appear to be suffering from a degree of heteroscedasticity which lme has a convenient method of handling so I think this may be a better option taking this also into account. I will in the near future be needing to model a binary response variable in which case I will need the lmer function, so any further suggestions would be useful. $\endgroup$ Aug 2, 2012 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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