powered by
The Zero-Inflated Negative Binomial Distribution
pzinb(q, size, mu, rho, lower.tail = TRUE, log.p = FALSE)
A vector of quantities.
The dispersion paramater used in dnbinom
dnbinom
The mean parameter used in dnbinom.
The zero-inflation parameter.
Logical; if TRUE, then probabilities are P(X <= x). Otherwise, P(X > x).
TRUE
Logical; if TRUE, then log(p) is returned.
The probabilities for the given q values.
q
# NOT RUN { x <- rzinb(10, 1, 10, 0.1) p <- pzinb(x, 1, 10, 0.1) y <- qzinb(p, 1, 10, 0.1) all(x == y) # Compute P(0 < X < 5) for X ~ ZINB(1, 10, 0.1) sum(dzinb(0:5, 1, 10, 0.1)) # }
Run the code above in your browser using DataLab