I am trying to apply a Gamma GLM to a dataset. The main issue is the lack of fit for quantile deviations although no other problems are detected. I have read similar posts without a conclusive answer.
My main question is if despite obtaining a poor fit regarding the quantiles but a good one in the other parameters the model is still trustworthy.
Please find a reproducible example below.
library(DHARMa)
library(car)
datos <- data.frame(
Time = c(20.79, 387.69, 11.55, 25.63, 12.11, 34.74, 30.76, 11.69,
11.55, 1522.86, 1742.24, 39.84, 24.26),
Ratio = c(1.56, 2.02, 1.49, 1.55, 1.26, 1.77, 2.76, 0.86, 1.40,
1.84, 1.21, 2.02, 2.33),
Type = as.factor(c("NWB", "NWB", "NWB", "NWB", "NWB",
"WB", "WB", "WB", "WB", "WB", "WB", "WB", "WB"))
)
datos
m1<- glm(Time~ Type+Ratio,Gamma(link="log"), data=datos, control = list(maxit = 100))
Anova(m1)
residh <- simulateResiduals(m1)
plotResiduals(residh, form = datos$Ratio)
plotResiduals(residh, form = datos$Type)
testDispersion(residh)
testUniformity(residh)