genpois1UC: Generalized Poisson Distribution (GP-1 and GP-2...

Description Usage Arguments Details Value Warning Author(s) References See Also Examples

Description

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.

Usage

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)

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 >= 1. The default value of dispind corresponds to an ordinary Poisson distribution.

disppar

The dispersion parameter for the GP-2: disppar >= 0. The default value of disppar corresponds to an ordinary Poisson distribution.

lower.tail, log

See Genpois0.

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 μ \varphi where \varphi = 1 / (1 - λ)^2 is dispind.

The variance of a GP-2 is μ (1 + α μ)^2 where θ = μ / (1 + α μ), λ = α μ / (1 + α μ), and is α 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, μ = θ /(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).

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.

Warning

Genpois0 has warnings that should be heeded.

Author(s)

T. W. Yee.

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

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)

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.