ZIP {ZIM} | R Documentation |
The Zero-Inflated Poisson Distribution
Description
Density, distribution function, quantile function and random generation for the
zero-inflated Poisson (ZIP) distribution with parameters lambda
and omega
.
Usage
dzip(x, lambda, omega, log = FALSE)
pzip(q, lambda, omega, lower.tail = TRUE, log.p = FALSE)
qzip(p, lambda, omega, lower.tail = TRUE, log.p = FALSE)
rzip(n, lambda, omega)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of random values to return. |
lambda |
vector of (non-negative) means. |
omega |
zero-inflation parameter. |
log , log.p |
logical; if TRUE, probabilities |
lower.tail |
logical; if TRUE (default), probabilities are |
Value
dzip
gives the density, pzip
gives the distribution function,
qzip
gives the quantile function, and rzip
generates random deviates.
See Also
dzinb
, pzinb
, qzinb
, and rzinb
for the zero-inflated negative binomial (ZINB) distribution.
Examples
dzip(x = 0:10, lambda = 1, omega = 0.5)
pzip(q = c(1, 5, 9), lambda = 1, omega = 0.5)
qzip(p = c(0.25, 0.50, 0.75), lambda = 1, omega = 0.5)
set.seed(123)
rzip(n = 100, lambda = 1, omega = 0.5)
[Package ZIM version 1.1.0 Index]