Zero-Inflated models in Stan

Inflation as a mixture model becomes…complicated when the baseline model is continuous and not discrete. In this case the relative probability of observing the inflated value for the (discrete) inflation model verses the (continuous) baseline model is infinity; in other words if you see the inflated value then you basically know that the probably of the inflated component is 1and the probability of the baseline component is zero. The technical details require carefully differentiating between probabilities and probability densities.

Fortunately the fact that the baseline model is negligible when the inflated value is observed means that the mixture model always reduces to two independent contributions – a binomial model for observing inflated values verses non inflated values and the baseline model for the non-inflated values. If you only care about how often you see an inflated value then you just need the binomial model; if you only care about the non-inflated values then you can ignore the observations at the inflated values entirely. If you care about both then you can write a Stan program with both contributions and not worry about trying to build a mixture model.

5 Likes