| skellam | R Documentation |
Probability mass function, distribution function, and random generation for the Skellam distribution.
dskellam(x, mu1, mu2, log = FALSE)
rskellam(n, mu1, mu2)
x |
integer vector of counts |
mu1, mu2 |
Poisson means |
log |
logical; return log-density if TRUE |
n |
number of random values to return. |
The Skellam distribution is the distribution of the difference of two Poisson random variables. Specifically, if X_1 \sim \text{Pois}(\mu_1) and X_2 \sim \text{Pois}(\mu_2), then X_1 - X_2 \sim \text{Skellam}(\mu_1, \mu_2).
This implementation of dskellam allows for automatic differentiation with RTMB.
dskellam gives the probability mass function and rskellam generates random deviates.
x <- rskellam(1, 2, 3)
d <- dskellam(x, 2, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.