DHARMa icon indicating copy to clipboard operation
DHARMa copied to clipboard

Force dispersion tests with re.form = NULL

Open florianhartig opened this issue 4 years ago • 2 comments

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)

florianhartig avatar Mar 05 '20 21:03 florianhartig

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.

florianhartig avatar May 08 '20 12:05 florianhartig

See also #117

florianhartig avatar Jun 22 '20 16:06 florianhartig