Open MatildeCorreia17 opened 6 days ago
Hi @MatildeCorreia17,
the plot on the right side is produced by the plotResiduals
function. The help page of the function can help you interpret the results:
Given that you have a very large dataset (>10000), instead of plotting all the data points, the function produces a smoothed color density representation of the scatterplot (see the help of the function smoothScatter
in the package graphics). So, the more gray, the more data points.
The red dotted line, in your case, is a smooth spline (the default for datasets larger than 2000). It shows a deviation from the expected straight line around 0.5.
You probably have heteroscedasticity in your data, i.e. the dispersion changes with the predicted mean (indicated by the non-straight line for the spline and the white triangle area in the bottom left of the plot). You could address it with the dispersion argument in glmmTMB.
Or it could be also the case that the Gamma distribution (with the link function you are using) is not the best distribution for your data.
Best, Melina
Hi, I have a dataset with 25612 observations and I modeled the utilization area against some biological traits, with a glmmTMB using family= gamma(link="log"). When I was analyzing the residuals with DHARMa package, I obtained the following plots:
I get that my model is not of a good fit, but I would like to understand better the interpretation of the residuals vs. predicted (what are the red lines, the black points and the grey shading)