florianhartig / DHARMa

Diagnostics for HierArchical Regession Models
http://florianhartig.github.io/DHARMa/
201 stars 21 forks source link

Gamma GLM Residuals #337

Closed sssiv93 closed 2 years ago

sssiv93 commented 2 years ago

Hi Florian,

Massive thank you for your work in putting together this package! It is hugely useful.

I was wondering if you could help me interpret the simulated residual plots for my Gamma GLM model with a log link. As you can see, the QQ plot looks great but I am seeing quantile deviations in the quantile plot (in the 1st attachment), as well as in the quantile plots of the residuals against the predictors (in the 2nd and 3rd attachments). Would you consider these deviations large enough to discard this model, considering that this is based on a training dataset of 144 observations? Do you have any insights into the implications of such deviations for this model?

Screenshot 2022-06-14 at 12 30 39 Screenshot 2022-06-14 at 12 30 44 Screenshot 2022-06-14 at 12 31 04

florianhartig commented 2 years ago

Hello sssiv93,

to me, this doesn't look concerning. These deviations are probably barely significant, could also be by chance.

If there is something, it's probably in the variable Impressions, so you could play around with adding a nonlinear (e.g. sort, quadratic) term for this variable, but this will make the interpretation of this variable harder, so if your main goal is to make inference about the effect direction, I would probably leave the model as it is.

Best, F

sssiv93 commented 2 years ago

Thank you for the suggestions! The main goal is inference, so I will take your advice to leave the model as is.

florianhartig commented 2 years ago

Glad that this was useful. Will close now!