genpoisson2: Generalized Poisson Regression (GP-2 Parameterization)

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

View source: R/family.univariate.R

Description

Estimation of the two-parameter generalized Poisson distribution (GP-2 parameterization) which has the variance as a cubic function of the mean.

Usage

1
2
3
4
genpoisson2(lmeanpar = "loglink", ldisppar = "loglink",
           imeanpar = NULL, idisppar = NULL, imethod = c(1, 1),
           ishrinkage = 0.95, gdisppar = exp(1:5),
           parallel = FALSE, zero = "disppar")

Arguments

lmeanpar, ldisppar

Parameter link functions for μ and α. They are called the mean and dispersion parameters respectively. See Links for more choices. In theory the α parameter might be allowed to be negative to handle underdispersion but this is not supported. All parameters are positive, therefore the defaults are the log link.

imeanpar, idisppar

Optional initial values for μ and α. The default is to choose values internally.

imethod

See CommonVGAMffArguments for information. The argument is recycled to length 2, and the first value corresponds to μ, etc.

ishrinkage, zero

See CommonVGAMffArguments for information.

gdisppar, parallel

See CommonVGAMffArguments for information. Argument gdisppar is similar to gsigma there and is currently used only if imethod[2] = 2.

Details

This is a variant of the generalized Poisson distribution (GPD) and called GP-2 by some writers such as Yang, et al. (2009). Compared to the original GP-0 (see genpoisson0 the GP-2 has θ = μ / (1 + α μ) and λ = α μ / (1 + α μ) so that the variance is μ (1 + α μ)^2. The first linear predictor by default is eta1 = log mu so that the GP-2 is more suitable for regression than the GP-0.

This family function can handle only overdispersion relative to the Poisson. An ordinary Poisson distribution corresponds to α = 0. The mean (returned as the fitted values) is E(Y) = μ.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Warning

See genpoisson0 for warnings relevant here, e.g., it is a good idea to monitor convergence because of equidispersion and underdispersion.

Author(s)

T. W. Yee.

References

Letac, G. and Mora, M. (1990). Natural real exponential familes with cubic variance functions. Annals of Statistics 18, 1–37.

See Also

Genpois2, genpoisson0, genpoisson1, poissonff, negbinomial, Poisson, quasipoisson.

Examples

1
2
3
4
5
6
gdata <- data.frame(x2 = runif(nn <- 500))
gdata <- transform(gdata, y1 = rgenpois2(nn, mean = exp(2 + x2),
                                         loglink(-1, inverse = TRUE)))
gfit2 <- vglm(y1 ~ x2, genpoisson2, data = gdata, trace = TRUE)
coef(gfit2, matrix = TRUE)
summary(gfit2)

Example output

Loading required package: stats4
Loading required package: splines
VGLM    linear loop  1 :  loglikelihood = -1739.1089
VGLM    linear loop  2 :  loglikelihood = -1736.8721
VGLM    linear loop  3 :  loglikelihood = -1736.8484
VGLM    linear loop  4 :  loglikelihood = -1736.8484
VGLM    linear loop  5 :  loglikelihood = -1736.8484
            loglink(meanpar) loglink(disppar)
(Intercept)        2.1706121        -1.034518
x2                 0.6387838         0.000000

Call:
vglm(formula = y1 ~ x2, family = genpoisson2, data = gdata, trace = TRUE)

Coefficients: 
              Estimate Std. Error z value Pr(>|z|)    
(Intercept):1  2.17061    0.12990  16.710  < 2e-16 ***
(Intercept):2 -1.03452    0.05111 -20.243  < 2e-16 ***
x2             0.63878    0.23868   2.676  0.00744 ** 
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

Names of linear predictors: loglink(meanpar), loglink(disppar)

Log-likelihood: -1736.848 on 997 degrees of freedom

Number of Fisher scoring iterations: 5 

No Hauck-Donner effect found in any of the estimates

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