dtnegb | R Documentation |
dptnegb
gives the probability mass function, ptnegb
gives the cumulative mass
function, qtnegb
the quantile function, rtnegb
randome number generation
dtnegb(x, mu, k, log = FALSE) ptnegb(q, mu, k, lower.tail = TRUE, log = FALSE) qtnegb(p, mu, k, lower.tail = TRUE, log = FALSE) rtnegb(n, mu, k)
x |
vector of integers for which to return the probability |
mu |
mean abundance |
k |
dispersion parameter |
log |
logical, should the log probability be used |
q |
vector of integers for which to return the cumulative probability |
lower.tail |
logical, should the lower tail be used |
p |
vector of probabilities for which to return the quantile |
n |
number of random replicates |
These functions assume infinite support of the truncated negative binomial from [1, Inf). The parameterization uses the mean of the untruncated distribution (μ) and the dispersion (k). This relates to a Gamma-Poisson mixture as trunNB(x; μ, k) = \int_0^{\inf} trunPois(x; λ) Gamma(λ; k, k/μ).
A numeric vector of length equal to the input
Andy Rominger <ajrominger@gmail.com>
dnbinom
dtnegb(1:10, 0.5, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.