Density, distribution function, quantile function and and random generation for two parameterizations (GP-1 and GP-2) of the generalized Poisson distribution of the mean.
1 2 3 4 5 6 7 8
dgenpois1(x, meanpar, dispind = 1, log = FALSE) pgenpois1(q, meanpar, dispind = 1, lower.tail = TRUE) qgenpois1(p, meanpar, dispind = 1) rgenpois1(n, meanpar, dispind = 1) dgenpois2(x, meanpar, disppar = 0, log = FALSE) pgenpois2(q, meanpar, disppar = 0, lower.tail = TRUE) qgenpois2(p, meanpar, disppar = 0) rgenpois2(n, meanpar, disppar = 0)
Vector of quantiles.
Vector of probabilities.
The mean and dispersion index (index of dispersion), which
are the two parameters for the GP-1.
The mean is positive while the
The dispersion parameter for the GP-2:
These are wrapper functions for those in
The first parameter is the mean,
therefore both the GP-1 and GP-2 are recommended for regression
and can be compared somewhat
The variance of a GP-1 is μ \varphi
where \varphi = 1 / (1 - λ)^2 is
The variance of a GP-2 is μ (1 + α μ)^2
where θ = μ / (1 + α μ),
λ = α μ / (1 + α μ),
and is α is the dispersion parameter
Thus the variance is linear with respect to the mean for GP-1
the variance is cubic with respect to the mean for GP-2.
Recall that the index of dispersion (also known as the dispersion index) is the ratio of the variance and the mean. Also, μ = θ /(1 - λ) in the original formulation with variance θ /(1 - λ)^3. The GP-1 is due to Consul and Famoye (1992). The GP-2 is due to Wang and Famoye (1997).
dgenpois2 give the density,
dgenpois2 give the distribution function,
dgenpois2 give the quantile function, and
dgenpois2 generate random deviates.
Genpois0 for more information.
Genpois0 has warnings that should be heeded.
T. W. Yee.
Consul, P. C. and Famoye, F. (1992). Generalized Poisson regression model. Comm. Statist.—Theory and Meth., 2, 89–109.
Wang, W. and Famoye, F. (1997). Modeling household fertility decisions with generalized Poisson regression. J. Population Econom., 10, 273–283.
1 2 3 4 5 6 7 8 9
sum(dgenpois1(0:1000, meanpar = 5, dispind = 2)) ## Not run: dispind <- 5; meanpar <- 5; y <- 0:15 proby <- dgenpois1(y, meanpar = meanpar, dispind) plot(y, proby, type = "h", col = "blue", lwd = 2, ylab = "P[Y=y]", main = paste0("Y ~ GP-1(meanpar=", meanpar, ", dispind=", dispind, ")"), las = 1, ylim = c(0, 0.3), sub = "Orange is the Poisson probability function") lines(y + 0.1, dpois(y, meanpar), type = "h", lwd = 2, col = "orange") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.