I'm working with a binomial, logistic regression model using the glmer function from lme4. I'm interested in looking at the diagnostics of my top model and have run code using DHARMa to look at my residuals with one of my factor variables (HabitatType.f) since I know the package is useful for GLMMs. At first, I ran my code as the below with refit = F and produced the below outputs:
res <- simulateResiduals(mod.top, plot=T, refit = F)
par(mfrow = c(1,3))
plotResiduals(res, diel_sub$HabitatType.f)
testDispersion(res)
testZeroInflation(res)
But because I am using a random effect of "site", I chose to change refit to T to conduct bootstrapping and got the following outputs:
I don't have any experience interpreting these plots for GLMMs and was hoping someone could help me with the interpretation. I see that when I use bootstrapping, my QQplot line is much closer to the expected line, but the p-values for the KS test, Dispersion test, and Outlier test are all significant whereas without bootstrapping, my QQplot line is more varied from the expected and only the outlier test and KS test have significant p-values.
Also as I mentioned, I am running these residuals against my factor variable of HabitatType which has three levels. But for some reason, both with and without bootstrapping, my figure for the Levene Test for homogeneity of variance is showing a 4th level (unlabeled) and I can't seem to figure out why this 4th level is being produced on the plots.
Any guidance you can provide would be much appreciated and thanks in advance!
Hi folks,
I'm working with a binomial, logistic regression model using the glmer function from lme4. I'm interested in looking at the diagnostics of my top model and have run code using DHARMa to look at my residuals with one of my factor variables (HabitatType.f) since I know the package is useful for GLMMs. At first, I ran my code as the below with refit = F and produced the below outputs: res <- simulateResiduals(mod.top, plot=T, refit = F) par(mfrow = c(1,3)) plotResiduals(res, diel_sub$HabitatType.f) testDispersion(res) testZeroInflation(res)
But because I am using a random effect of "site", I chose to change refit to T to conduct bootstrapping and got the following outputs:
I don't have any experience interpreting these plots for GLMMs and was hoping someone could help me with the interpretation. I see that when I use bootstrapping, my QQplot line is much closer to the expected line, but the p-values for the KS test, Dispersion test, and Outlier test are all significant whereas without bootstrapping, my QQplot line is more varied from the expected and only the outlier test and KS test have significant p-values.
Also as I mentioned, I am running these residuals against my factor variable of HabitatType which has three levels. But for some reason, both with and without bootstrapping, my figure for the Levene Test for homogeneity of variance is showing a 4th level (unlabeled) and I can't seem to figure out why this 4th level is being produced on the plots.
Any guidance you can provide would be much appreciated and thanks in advance!