I am fitting a poisson GLMM of the type

glmer(captured ~ treatment + offset(log(Effort)) + (1|Trip_Code), data=x, family="poisson", glmerControl(optimizer = "bobyqa"))

where captured is a count and treatment is a categorical variable with two levels (control and experiment). The dependent variable contains mainly zeros (Fig 1).

I am running some diagnostic tests using the DHARMa package and I did not detect any singularity, overdispersion or zero inflation.

When I check the quantile residuals plots though, using two different methods a) and b) I obtain two different results.

simulationOutput <- simulateResiduals(fittedModel = m1)


With method a) no significant quantile deviation is detected (Fig 2, right plot), while it is detected with method b) (Fig 3). However, I was expecting a) and b) to give the same results since the R documentation for testQuantiles {DHARMa} explains:

the quantile test is automatically performed in


I understand that method a) plots rank transformed model predictions, while b) doesn't but I wouldn't think this affects the p-value, am I correct? I also understand that method a) automatically adds some noise to the residuals to maintain a uniform response (see: integerResponse parameter). Does method b) do the same? If it doesn't, could that be the reason for the different results?

Many thanks


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.