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 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)

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

library(languageR)
plotLMER.fnc(fm)
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
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
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. –  Jonathan Bone Aug 2 '12 at 15:09
add comment

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.