Functions to specify zero-inflation or hurdle model components for ratio models. These handle excess zeros in count data where the standard count distribution (Poisson, negative binomial) doesn't adequately capture the zero proportion.
Note on naming convention: These functions (zi_poisson(), zi_negbin(),
hurdle_poisson(), hurdle_negbin()) are ZI specification functions for
the zi argument in tratio(). They are distinct from the family functions
(ratiod_zipois(), ratiod_zinegbin(), ratiod_hurdle_pois(), ratiod_hurdle_negbin())
which specify the complete model family. Use ZI specifications when you want to
add zero-inflation to an existing family; use ZI family functions when you want
a pre-configured zero-inflated family.
Details
Zero-Inflated Models: Zero-inflated models assume two data-generating processes:
A process that generates "structural zeros" with probability \(\pi\)
A count process that generates counts (including zeros) with probability \(1-\pi\)
The probability of observing y is: $$P(Y=0) = \pi + (1-\pi) \cdot P_{count}(0)$$ $$P(Y=y|y>0) = (1-\pi) \cdot P_{count}(y)$$
Hurdle Models: Hurdle models treat the process as:
A binary process determining zero vs non-zero
A truncated count process (conditional on y > 0)
$$P(Y=0) = 1 - \theta$$ $$P(Y=y|y>0) = \theta \cdot P_{count}(y|y>0)$$
When to use:
zi_poisson(): Excess zeros with equidispersed positive countszi_negbin(): Excess zeros with overdispersed positive countshurdle_poisson(): Zero hurdle with equidispersed positive countshurdle_negbin(): Zero hurdle with overdispersed positive counts