I am trying to validate the goodness of fit of a model in glmer using residuals plotting.

I went through many threads here related to this but still I am not sure that the solutions offered apply to my data.

The model I fitted is

m4<-glmer(match ~ Listgp + length + gender + age+ Listgp*gender + (Listgp-1|stimulus) + (length-1|listener), data = msba, family = "binomial", control=glmerControl(optCtrl=list(maxfun=20000)), nAGQ =1)

All variables in the model are categorical except for “age”. “Listgp” and “length” are my two variables of interest whereas “age” and “gender” are control variables.

Here is a simple plot of m4 m4 plot

Then I plotted a residual vs.fitted plot (using the Kerdeist package) and got the following plot (plot 2). residuals vs. fitted values plot

I then plotted the residuals against the three categorical variables that I have in the model.

enter image description here

Finally, I plotted the residuals against the continuous predictor (age) as follows.

  residuals against continuous predictor

Does the 2nd plot of predicted against residuals indicate that the model is a good fit of the data or not? And are my residuals heteroskedastic?

I read somewhere that the solid line has to overlay the dashed line in the center (0-line) of the predicted model- residuals plot but this is not what is happening in my glmer binomial model. Am I doing things correctly here?

Any help would be appreciated. Shad


Your Answer

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

Browse other questions tagged or ask your own question.