# Why residual plots are used for diagnostic of glm

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.

lognormal linear model Log link gamma glm • See my answer here: stats.stackexchange.com/questions/295340/… Oct 10, 2017 at 15:50
• 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 Oct 11, 2017 at 1:56
• @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. Oct 11, 2017 at 15:55
• Your log-link gamma glm plot labels show the expected order statistics on the y axis not the x-axis Oct 12, 2017 at 1:40
• @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 Oct 12, 2017 at 3:02
{"ft_lang_label":"__label__en","ft_lang_prob":0.9503236,"math_prob":0.72892714,"size":1037,"snap":"2023-40-2023-50","text_gpt3_token_len":224,"char_repetition_ratio":0.1287512,"word_repetition_ratio":0.0,"special_character_ratio":0.20347156,"punctuation_ratio":0.09615385,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9923209,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,4,null,4,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-21T16:48:44Z\",\"WARC-Record-ID\":\"<urn:uuid:b7e679fa-4814-46d7-a58c-066c114833b6>\",\"Content-Length\":\"183725\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fb496578-45c2-42f4-bb86-dba201f8a794>\",\"WARC-Concurrent-To\":\"<urn:uuid:39699e4a-ad9f-4143-be48-5246a3fcec13>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/307221/why-residual-plots-are-used-for-diagnostic-of-glm\",\"WARC-Payload-Digest\":\"sha1:LWICTOHQOP4ARFECBVOWZ3D6QXMQCH7S\",\"WARC-Block-Digest\":\"sha1:RW23JTEZ2PQHJTX3EBESYIHLXWVJIFZB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506028.36_warc_CC-MAIN-20230921141907-20230921171907-00497.warc.gz\"}"}