I asked this question here which @Glen_b had kindly answered. I thought I could get a more detailed explanation with references if I posted it as a whole new question.

So my questions is why residuals plots such as residual vs fitted plot and normal QQ normal can be used for diagnostic of glm? Residuals vs fitted are used for OLS to checked for heterogeneity of residuals and normal qq plot is used to check normality of residuals. However there is no such assumption for glm (e.g. gamma, poisson and negative binomial). So why are these plot still being used to diagnose glm? There are questions (1,2 and etc.) that discussed its usage but the did not explain the reason for their relevance. There is even a command glm.diag.plots from R package boot that provides residuals plots for glm.

Here are some plots from my current analysis. I am trying to select a model among the three: OLS, lognormal OLS and gamma with log link. Perhaps it will be easier to discuss using these plots as examples.

Linear model enter image description here

lognormal linear model enter image description here

Log link gamma glm enter image description here

Additional plots for log link gamma glm

enter image description here

  • $\begingroup$ See my answer here: stats.stackexchange.com/questions/295340/… $\endgroup$ – kjetil b halvorsen Oct 10 '17 at 15:50
  • 1
    $\begingroup$ Note that the normal QQ plot has the expected order statistics on the x-axis and the ordered residuals on the y-axis -- some of your other plots reverse this convention, making the comparison difficult $\endgroup$ – Glen_b Oct 11 '17 at 1:56
  • $\begingroup$ @Glen_b I have added the Normal QQ plot that has the expected order statistics on the x-axis and the ordered residuals on the y-axis for gamma glm. The same is similar (perhaps the same) as the QQ plot with swapped axis. $\endgroup$ – tatami Oct 11 '17 at 15:55
  • $\begingroup$ Your log-link gamma glm plot labels show the expected order statistics on the y axis not the x-axis $\endgroup$ – Glen_b Oct 12 '17 at 1:40
  • $\begingroup$ @Glen_b log-link gamma glm plot with expected order statistics on x-axis can be found in the center of last row of plots $\endgroup$ – tatami Oct 12 '17 at 3:02

These plots should be used with caution with non-normal GLMs. My general recommendation is not to look at them if you aren't fitting an OLS regression model (see: Interpretation of plot (glm.model)). For example, why assess whether the residuals are normally distributed when they aren't necessarily supposed to be?

With respect to your specific plots / models, the predictions look pretty far off except for the OLS model. The OLS model seems to have some problems with heteroscedasticity and non-normality of the residuals. I tend to be somewhat skeptical of 'model selection', and I would advise against fitting a bunch of different models and selecting the one with the nicest looking plots. You should start with an understanding of your data and your situation. For instance, it looks like your response is never negative. What is it? Asking (and answering) questions like that should guide you towards the model you want to use.

| cite | improve this answer | |
  • 1
    $\begingroup$ To answer your question, it is a health financial data. It is highly right skewed. My sample is more than 400k with trivial number of zeros (0.01%) which I dropped. Skewness is about 90 and kurtosis is about 180. $\endgroup$ – tatami Oct 11 '17 at 2:01
  • $\begingroup$ "With respect to your specific plots / models, the predictions look pretty far off except for the OLS model." May I know if this is base on the residual vs fitted plot? $\endgroup$ – tatami Oct 12 '17 at 8:41
  • 1
    $\begingroup$ @tatami, yes I notice it in, eg, the lognormal residuals vs fitted plot. When the predicted values are larger, the residuals are all highly negative. That means that your model is completely missing where the data are in that region. It's possible that by examining some residual vs X plots, you could find somewhere to add a squared term to help out. $\endgroup$ – gung - Reinstate Monica Oct 12 '17 at 11:53
  • 1
    $\begingroup$ If the model is correct, the deviance residuals (as used in the Q-Q plot) are often quite close to normally distributed; while you shouldn't expect a perfect line, strong deviations from it at least suggests an issue. It's worth trying it for simulated examples from a number of GLMs to at least get a sense of how far off you can tend to get. For the gamma and the Poisson (as long as the mean doesn't jam right down near 0) it's often surprisingly close. On 0-1 data ... sometimes not so much. See the analysis here $\endgroup$ – Glen_b Oct 17 '17 at 8:36

Your Answer

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

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