Skip to contents

For ZIP(pi, lambda) the mean is \((1-\pi)\lambda\) and the zero probability \(\pi + (1-\pi)e^{-\lambda}\), strictly between \(e^{-\mu}\) and 1. The negative binomial zero probability \((1+\mu/\theta)^{-\theta}\) runs continuously from 1 to \(e^{-\mu}\), so some \(\theta\) matches (Research.P7.ZeroInflation.nb_matches_zip): the zero share with the mean cannot tell inflation from heterogeneity.

Usage

morie_nb_matches_zip(pi, lambda)

Arguments

pi

Inflation weight in (0, 1).

lambda

Poisson rate of the uninflated part, positive.

Value

A list: mean, zip_zero, theta (the matching dispersion), nb_zero (equal to zip_zero) and size (theta, the dnbinom parameterisation).

References

Weisburd D, Britt C (2014). Statistics in Criminal Justice, 4th ed., ch. 6. Springer.

Examples

morie_nb_matches_zip(pi = 0.3, lambda = 2)
#> $mean
#> [1] 1.4
#> 
#> $zip_zero
#> [1] 0.3947347
#> 
#> $theta
#> [1] 1.207328
#> 
#> $nb_zero
#> [1] 0.3947347
#> 
#> $size
#> [1] 1.207328
#> 
#> attr(,"theorem")
#> [1] "Research.P7.ZeroInflation.nb_matches_zip"