dzinbinom {emdbook}R Documentation

Zero-inflated negative binomial distribution

Description

Probability distribution function and random variate generation for the zero-inflated negative binomial distribution

Usage

dzinbinom(x, mu, size, zprob, log=FALSE)
rzinbinom(n, mu, size, zprob)

Arguments

x vector of integer values
n number of values to draw
mu mean parameter (or vector of parameters) of negative binomial
size number of trials/overdispersion parameter (or vector of parameters) of negative binomial
zprob probability of structural zeros
log return log probability?

Details

The zero-inflated negative binomial distribution is widely used to model extra zero counts in count data that otherwise follows a negative binomial distribution. The probability distribution is

p(0) = pz + (1-pz) NB(0,mu,k)

and

p(x) = (1-pz) NB(x,mu,k)

for x>0.

Value

Probabilities of x or random deviates.

Note

Only the "ecological" parameterization is included here (must specify mu, not prob)

Author(s)

Ben Bolker

References

Tyre et al., "Improving precision and reducing bias in biological surveys: estimating false-negative error rates", Ecological Applications 13:1790-1801 (2003)

See Also

dnbinom, Simon Jackman's pscl package

Examples

dzinbinom(0:9,mu=2,zprob=0.3,size=0.9)
dnbinom(0:9,mu=2,size=0.9)
rzinbinom(10,mu=2,zprob=0.3,size=0.9)

[Package emdbook version 1.1.1.1 Index]