testQuantiles() produces different output depending on plot=T or F

28 views Asked by At

I I am using the DHARMa package to evaluate the fit of a binomial glm. Plotting the simulation output shows no signs of over/underdispersion and no quantile deviations. When plotting one of my predictors against the simulated output I get the following:

plotResiduals(simulationOutput, df$Predictor2)

picture:output plotResiduals against predictor

To investigate further I used the testQuantile function, but depending on if i put plot=T or plot=F I get different p-values.

x <-testQuantiles(simulationOutput,df$Predictor2, plot=T)
x$pvals
x

picture:output if plot=T

x <-testQuantiles(simulationOutput,df$Predictor2, plot=F)
x$pvals
x

picture:output if plot=F

Why do I get different p-values? How should I interpret this? Looking at the p-values from when I use plot=F, the deviations are non-significant so that means that I should be able to move on with my model as is, right? But some of the p-values from when I use plot=T are significant which I interpret could mean that I could benefit from making changes to my model. How should I move forward?

0

There are 0 answers