zinbinom: The Zero-inflated Negative Binomial Distribution

zinbinomR Documentation

The Zero-inflated Negative Binomial Distribution

Description

Density, distribution function, quantile function and random generation for the zero-inflated negative binomial distribution with parameters w, size and prob.

Usage

dzinbinom(x, w, size, prob, mu)

pzinbinom(q, w, size, prob, mu, lower.tail = TRUE)

qzinbinom(p, w, size, prob, mu, lower.tail = TRUE)

rzinbinom(n, w, size, prob, mu)

Arguments

x

Vector of (non-negative integer) quantiles.

w

Weight of the zero-inflation. 0 <= w <= 1.

size

Target for number of successful trials, or dispersion parameter (the shape parameter of the gamma mixing distribution). Must be strictly positive, need not be integer.

prob

Probability of success in each trial. 0 < prob <= 1.

mu

Alternative parametrization via mean: see ‘Details’.

q

Vector of quantiles.

lower.tail

logical; if TRUE (default), probabilities are P[X \le x], otherwise, P[X > x].

p

Vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

The zero-inflated negative binomial distribution with size = n and prob = p has density

p(x) = w + (1-w) \frac{\Gamma(x+n)}{\Gamma(n) x!} p^n (1-p)^x

for x = 0, n > 0, 0 < p \le 1 and 0 \le w \le 1.

p(x) = (1-w) \frac{\Gamma(x+n)}{\Gamma(n) x!} p^n (1-p)^x

for x = 1, 2, \ldots, n > 0, 0 < p \le 1 and 0 \le w \le 1.

Value

dzinbinom gives the density, pzinbinom gives the distribution function, qzinbinom gives the quantile function, and rzinbinom generates random deviates.

Functions

  • dzinbinom: gives the density

  • pzinbinom: gives the cumulative distribution function

  • qzinbinom: gives the quantile function

  • rzinbinom: random number generation

Author(s)

Matthias Heinig, Aaron Taudt

See Also

Distributions for standard distributions, including dbinom for the binomial, dnbinom for the negative binomial, dpois for the Poisson and dgeom for the geometric distribution, which is a special case of the negative binomial.


ataudt/aneufinder documentation built on April 18, 2023, 4:20 a.m.