I am fitting a Gamma GLMM (lme4::glmer
) with log link and doing model diagnostics with DHARMa. I am getting significant results indicating my residuals are not ideal. I have read that large sample size (in my case n=3526
) can yield significant tests, and just by eye I can't see obvious patterns in the residuals. Can I trust this model? If not, what next steps are suggested by these residuals?
1 Answer
I'm the developer of DHARMa, which does not mean though that I have the final wisdom regarding the interpretation of residuals patterns! Nevertheless, here my 2 cents regarding your plots:
There are a number of slight, but significant deviations visible. The significance as such is not the concern, as any (inevitably present) model error will result in significant residual patterns given your sample size. Therefore, what we should concentrate on is the magnitude of the deviation. See also my general comments on this point here.
Regarding the latter: the magnitude of the pattern doesn't look large enough to me to cause major concerns regarding inferential products such as p-values etc. That being said, you could address (optionally) some of the issue we see by switching from lme4 to glmmTMB, which should also allow you to model the dispersion of the Gamma.