I am working on binomial and betabinomial models using glmmTMB (also on negative binomial) and I am using DHARMa package to test the residuals. But I am having a problem with the outcome. All of the test show that N.s. results, when I test for outliners, dispersion and zero-inflation, seems like there are no problems in my model. Also the QQplot seems good, but for all three models, on residual vs. predicted plot, there are some outliners (2-3). Why?And what should I do? Ignore them and say that model is correct or I should do something to the data?
2 Answers
Nicholas answer is correct. Some more quotes from the DHARMa vignette:
Note that outliers in DHARMa are values that are by default defined as values outside the simulation envelope, not in terms of a particular quantile. Thus, which values will appear as outliers will depend on the number of simulations.
Thus, depending on the number of simulations, you expect a certain number of outliers to occur. Whether you have more outliers than expected is tested by testOutliers(), which is displayed in your plots. See help for the function here.
In your case, this test is n.s. so there is no reason for concern!
Independent on this, I would recommend to look at the comments about testing binomial responses in the Vignette here.
From the DHARMa vignette:
Simulation outliers (data points that are outside the range of simulated values) are highlighted as red stars. These points should be carefully interpreted, because we actually don’t know “how much” these values deviate from the model expectation. Note also that the probability of an outlier depends on the number of simulations, so whether the existence of outliers is a reason for concern depends also on the number of simulations.
The few points you have in your plot don't look that concerning to me, but it's hard to tell without a bit more context.