zipois {countreg} | R Documentation |
Density, distribution function, quantile function, random
generation and score function for the zero-inflated Poisson
distribution with parameters lambda
(= mean of the
uninflated distribution) and inflation probability
pi
(for structural zeros).
dzipois(x, lambda, pi, log = FALSE) pzipois(q, lambda, pi, lower.tail = TRUE, log.p = FALSE) qzipois(p, lambda, pi, lower.tail = TRUE, log.p = FALSE) rzipois(n, lambda, pi) szipois(x, lambda, pi, parameter = c("lambda", "pi"), drop = TRUE)
x |
vector of (non-negative integer) quantiles. |
q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of random values to return. |
lambda |
vector of non-negative means of the uninflated Poisson distribution. |
pi |
vector of zero inflation probabilities for structural zeros. |
log, log.p |
logical. If |
lower.tail |
logical. If |
parameter |
character. Should the derivative with respect to
|
drop |
logical. Should the result be a matrix ( |
The uninflated Poisson distribution has density
f(x) = λ^x exp(-λ)/x!
for x = 0, 1, 2, …. The zero-inflated density is then simply obtained as
g(x) = π I(x = 0) + (1 - π) f(x)
where I is the indicator function (for the point mass at zero).
dzipois
gives the (log) density,
pzipois
gives the (log) distribution function,
qzipois
gives the quantile function,
rzipois
generates random deviates, and
szipois
gives the score function (= derivative of
the log-density with respect to lambda and/or pi).