Learn R Programming

VGAM (version 1.1-12)

Genpois1: Generalized Poisson Distribution (GP-1 and GP-2 Parameterizations of the Mean)

Description

Density, distribution function, quantile function and random generation for two parameterizations (GP-1 and GP-2) of the generalized Poisson distribution of the mean.

Usage

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)

Value

dgenpois1 and dgenpois2 give the density, pgenpois1 and dgenpois2 give the distribution function, qgenpois1 and dgenpois2 give the quantile function, and rgenpois1 and dgenpois2 generate random deviates. See Genpois0 for more information.

Arguments

x, q

Vector of quantiles.

p

Vector of probabilities.

n

Similar to runif.

meanpar, dispind

The mean and dispersion index (index of dispersion), which are the two parameters for the GP-1. The mean is positive while the dispind is \(\geq 1\). The default value of dispind corresponds to an ordinary Poisson distribution.

disppar

The dispersion parameter for the GP-2: disppar \(\geq 0\). The default value of disppar corresponds to an ordinary Poisson distribution.

lower.tail, log

See Genpois0.

Author

T. W. Yee.

Warning

Genpois0 has warnings that should be heeded.

Details

These are wrapper functions for those in Genpois0. The first parameter is the mean, therefore both the GP-1 and GP-2 are recommended for regression and can be compared somewhat to poissonff and negbinomial. The variance of a GP-1 is \(\mu \varphi\) where \(\varphi = 1 / (1 - \lambda)^2\) is dispind.

The variance of a GP-2 is \(\mu (1 + \alpha \mu)^2\) where \(\theta = \mu / (1 + \alpha \mu)\), \(\lambda = \alpha \mu / (1 + \alpha \mu)\), and is \(\alpha\) is the dispersion parameter disppar. Thus the variance is linear with respect to the mean for GP-1 while 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, \(\mu = \theta /(1 - \lambda)\) in the original formulation with variance \(\theta /(1 - \lambda)^3\). The GP-1 is due to Consul and Famoye (1992). The GP-2 is due to Wang and Famoye (1997).

References

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.

See Also

Genpois0.

Examples

Run this code
sum(dgenpois1(0:1000, meanpar = 5, dispind = 2))
if (FALSE) 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") 

Run the code above in your browser using DataLab