zipois {countreg}R Documentation

The Zero-Inflated Poisson Distribution

Description

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).

Usage

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)

Arguments

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 TRUE, probabilities p are given as log(p).

lower.tail

logical. If TRUE (default), probabilities are P[X ≤ x], otherwise, P[X > x].

parameter

character. Should the derivative with respect to "mu" and/or "size" be computed?

drop

logical. Should the result be a matrix (drop = FALSE) or should the dimension be dropped (drop = TRUE, the default)?

Details

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).

Value

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).

See Also

dpois, zeroinfl


[Package countreg version 0.2-1 Index]