Density, distribution, quantile, and random generation for the King (1989)
generalized event count model with rate lambda and Katz dispersion
delta (< 1 underdispersed, = 1 Poisson, > 1 overdispersed).
On an unbounded support (delta >= 1) the mean is lambda and the
variance-to-mean ratio is delta exactly; for delta < 1 the support is
finite and the renormalized distribution's mean and variance equal those
values only when lambda/(1 - delta) is an integer (the exact moments are
finite sums of the pmf, as count_reg()'s siblings report them).
Consistent with the estimator gec().
Usage
dgec(x, lambda, delta, max.support = 500, log = FALSE)
pgec(q, lambda, delta, max.support = 500, lower.tail = TRUE, log.p = FALSE)
qgec(p, lambda, delta, max.support = 500, lower.tail = TRUE, log.p = FALSE)
rgec(n, lambda, delta, max.support = 500)Arguments
- x, q
Vector of quantiles (non-negative integers).
- lambda
Rate parameter (scalar or vector, recycled).
- delta
Katz dispersion parameter (scalar).
- max.support
Guard on the evaluated support.
- log, log.p
Return log probabilities.
- lower.tail
If
TRUE(default), \(P(X \le x)\).- p
Vector of probabilities.
- n
Number of draws.