DHARMa
DHARMa copied to clipboard
Force dispersion tests with re.form = NULL
From a bit of testing, it seems that the dispersion test is a lot more sensitive with re.form = NULL, i.e. with conditional simulations. If that is so (to be confirmed), maybe a conditional simulation (if possible) should be forced?
data = createData(1000, overdispersion = 0.3)
fit <- glmer(observedResponse ~ Environment1 + (1|group) ,
family="poisson", data = data)
res <- simulateResiduals(fit , n=1000 , plot=T)
testDispersion(res)
res <- simulateResiduals(fit , n=1000 , plot=T, re.form = NULL)
testDispersion(res)
I have added some explanations in the help. Probably wan't fix this, because it's too difficult to find out how "conditional" simulations are in the DHARMa object.
See also #117