-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zero-inflated fixed-effect Poisson models... how to plot/test residuals? #35
Comments
Hi, in general, count models that adjust for dispersion (such as the negative binomial) are not a good remedy for true zero-inflation. Zero-inflation is a type of overdispersion, but a very specific one, so it's better treated with a specific model. It's true that DHARMa currently doesn't support zeroinfl - I will put it on the list, but this has low priority for me at the moment, see https://github.com/florianhartig/DHARMa/wiki/Adding-new-packages However, I have an example with zero-inflation with overdispersion and DHARMa here that would do the trick for you https://theoreticalecology.wordpress.com/2017/07/01/bayesian-model-checking-via-posterior-predictive-simulations-bayesian-p-values-with-the-dharma-package/ About your question of the recommended course of action - it's not that difficult to detect zero-inflation. The point I made in the vignette that it's quite difficult to test for it via the residuals, the best course of action imo is to fit a model that includes both overdispersion and zero-inflation, and look at parameter estimates or compare it to an overdispersion-only model. |
I leave this open as a reminder to add a few comments in the vignette. I have created a new ticket for zeroinfl #36 but not sure how soon I can work on this. |
Thank you for your answer. For the short term I will try following the JAGS example you linked |
Before I close this, I wanted to point out that with #19 , there is now support for zero-inflated models in DHARMa. As glmmTMB includes the models in zeroinfl(), I would just switch to this package. |
The vignette talks about how to see if a model might be zero-inflated, but unless I missed it, there doesn't seem to be a recommended course of action to fix the model in the case of fixed-effect Poisson regression.
Searching around the web I found the
zeroinfl()
function in thepscl
package, but it doesn't work withDHARMa
so I can fit azeroinfl()
model, but I cannot plot its residuals to see how they changed. What do you guys use when you have a zero-inflated non mixed-effect Poisson model?I understand the point you made in the vigniette about zero inflation being hard to distinguish from overdispersion. Because of the nature of the data, it is mechanistically plausible that it will be zero inflated. The data are counts of complications in a manually curated registry of surgery patients.
Is it wrong to remedy zero-inflation by the same means as remedying overdispersion in general i.e. using a negative-binomial model instead? In that case I will try
glm.nb()
it sounds from the close issued like you already added support for it.Depending on the answer to the above question, this issue could be classified either as a documentation request or a feature request (to add support for
zeroinfl()
or some other zero-inflated Poisson model object).Thank you very much for your time and for creating this very helpful package.
The text was updated successfully, but these errors were encountered: