dzinbinom | R Documentation |
Probability distribution function and random variate generation for the zero-inflated negative binomial distribution
dzinbinom(x, mu, size, zprob, log=FALSE)
rzinbinom(n, mu, size, zprob)
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? |
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) =p_z + (1-p_z) NB(0,mu,k)
and
p(x) =(1-p_z) NB(x,mu,k)
for x>0
.
Probabilities of x or random deviates.
Only the "ecological" parameterization is included here
(must specify mu
, not prob
)
Ben Bolker
Tyre et al., "Improving precision and reducing bias in biological surveys: estimating false-negative error rates", Ecological Applications 13:1790-1801 (2003)
dnbinom
, Simon Jackman's pscl package
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.