Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

skellamUC

The Skellam Distribution


Description

Density and random generation for the Skellam distribution.

Usage

dskellam(x, mu1, mu2, log = FALSE)
rskellam(n, mu1, mu2)

Arguments

x

vector of quantiles.

n

number of observations. Same as runif.

mu1, mu2

See skellam

.

log

Logical; if TRUE, the logarithm is returned.

Details

See skellam, the VGAM family function for estimating the parameters, for the formula of the probability density function and other details.

Value

dskellam gives the density, and rskellam generates random deviates.

Warning

Numerical problems may occur for data if mu1 and/or mu2 are large. The normal approximation for this case has not been implemented yet.

See Also

Examples

## Not run:  mu1 <- 1; mu2 <- 2; x <- (-7):7
plot(x, dskellam(x, mu1, mu2), type = "h", las = 1, col = "blue",
     main = paste("Density of Skellam distribution with mu1 = ", mu1,
                  " and mu2 = ", mu2, sep = "")) 
## End(Not run)

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.