| zinbinom | R Documentation |
Probability mass function, distribution function, quantile function, and random generation for the zero-inflated negative binomial distribution.
dzinbinom(x, size, prob, zeroprob = 0, log = FALSE)
pzinbinom(q, size, prob, zeroprob = 0, lower.tail = TRUE, log.p = FALSE)
rzinbinom(n, size, prob, zeroprob = 0)
x, q |
vector of (non-negative integer) quantiles |
size |
size parameter, must be positive. |
prob |
mean parameter, must be positive. |
zeroprob |
zero-inflation probability between 0 and 1. |
log, log.p |
logical; if |
lower.tail |
logical; if |
n |
number of random values to return. |
p |
vector of probabilities |
This implementation allows for automatic differentiation with RTMB.
dzinbinom gives the density, pzinbinom gives the distribution function, and rzinbinom generates random deviates.
set.seed(123)
x <- rzinbinom(1, size = 2, prob = 0.5, zeroprob = 0.5)
d <- dzinbinom(x, size = 2, prob = 0.5, zeroprob = 0.5)
p <- pzinbinom(x, size = 2, prob = 0.5, zeroprob = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.