I was wondering if somebody could help with a question concerning GLM diagnostic plots. Specifically, I am running a Binomial GLM and when I go through diagnostic plots such as Deviance Residuals vs Fitted values, I get the following: enter image description here

Personally, it looks as if there is curvature so an issue with my model fit. Would people agree this plot suggests misfit?

  • 2
    $\begingroup$ I think you might be reading too much into this. The impression of curvature entirely disappears if you remove just one or two selected points out of these 22. $\endgroup$
    – whuber
    Commented Nov 30, 2016 at 19:06
  • $\begingroup$ Thanks for the reply! One additional note on this, do we rescale the y-axis when plotting residuals vs fitted values? For example, I have set it at [-2,2] here because this is a standard range. The curvature does become more apparent if I do not rescale... $\endgroup$ Commented Nov 30, 2016 at 19:14
  • $\begingroup$ That's an interesting question about data visualization, which deserves more discussion than can occur in comments. I do notice, though, that some of your points seem to be overplotted: it appears you might have more (perhaps far more) than 22 of them. If that's the case, then it would be worthwhile to jitter them a little so you can see whether that makes a difference. $\endgroup$
    – whuber
    Commented Nov 30, 2016 at 19:22
  • $\begingroup$ You are correct, there are 2 points overlapping - jittering really didn't make too much of a difference. Thanks for the replies! $\endgroup$ Commented Nov 30, 2016 at 19:44
  • 1
    $\begingroup$ If you want to assess whether your impression of curvature may just be noise or not, one approach is to simulate observations from the fitted model and plot their residuals -- say a dozen times to a couple of dozen times. If none of them look as curved, you have an indication that your plot suggests something else is going on. If several of them look as curved or more curved then you may be dealing with nothing more than noise. Even if you can be fairly confident it isn't just noise it may be that the effect is small enough that you don't especially care (all models are wrong, etc..etc... ) $\endgroup$
    – Glen_b
    Commented Nov 30, 2016 at 23:37

1 Answer 1


I agree with the comments that there is no indication of a problem in this plot.

That being said, even if you had more data, deviance residuals wouldn't be a good way to test for such a dependence, because also a perfectly fitting binomial model may exhibit inhomogeneous deviance residuals.

What works is the simulation approach suggested by Glen_b. This is implemented in the DHARMa R package, which uses simulations from the fitted model to transform the residuals of any GL(M)M into a standardized space. Once this is done, you can visually assess / test residual problems such as deviations from the distribution, residual dependency on a predictor, heteroskedasticity or autocorrelation in the normal way. See the package vignette for worked-through examples.


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.