Skip to contents

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:

  1. A process that generates "structural zeros" with probability \(\pi\)

  2. 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:

  1. A binary process determining zero vs non-zero

  2. 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: