Solved – GLM model validation; Patterns in residuals ? – R

generalized linear modelrvalidation

I have attached an image obtained during my model validation. I fitted a negative binomial GLM to my data and I have 4 models possible with more or less the same residual plots.
I have been reading about GLM as it is the first time that I use this model and it seems that if there is no pattern in the residuals the model is fine. I have to admit that I cannot really decide if my residuals follow a pattern or not. Is there a test that I could use instead of the graph? If you think that there are patterns here what can I do?
I have tried Poisson and quasi poisson as well but there are clear patterns this time.
My response variable is a count variable and I have both categorical and continuous covariates.

Thank you very much for your help!

enter image description here

Best Answer

Here are two tests that you could use:

  1. Whiteness Test
  2. Independence Test

In the whiteness test, if the autocorrelation function of the residuals is within the confidence interval of the estimates, then it is considered a pass.

In the Independence test, the residuals should not depend on past inputs. The Durbin-Watson statistic is used in this test.

Related Question