View source: R/family.univariate.R
genpoisson2 | R Documentation |
Estimation of the two-parameter generalized Poisson distribution (GP-2 parameterization) which has the variance as a cubic function of the mean.
genpoisson2(lmeanpar = "loglink", ldisppar = "loglink",
imeanpar = NULL, idisppar = NULL, imethod = c(1, 1),
ishrinkage = 0.95, gdisppar = exp(1:5),
parallel = FALSE, zero = "disppar")
lmeanpar, ldisppar |
Parameter link functions for |
imeanpar, idisppar |
Optional initial values for |
imethod |
See |
ishrinkage, zero |
See |
gdisppar, parallel |
See |
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
\theta = \mu / (1 + \alpha \mu)
and
\lambda = \alpha \mu / (1 + \alpha \mu)
so that
the variance is \mu (1 + \alpha \mu)^2
.
The first linear predictor by default is
\eta_1 = \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 \alpha = 0
.
The mean (returned as the fitted values) is E(Y) = \mu
.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
See genpoisson0
for warnings relevant here,
e.g., it is a good idea to monitor convergence because of
equidispersion and underdispersion.
T. W. Yee.
Letac, G. and Mora, M. (1990). Natural real exponential familes with cubic variance functions. Annals of Statistics 18, 1–37.
Genpois2
,
genpoisson0
,
genpoisson1
,
poissonff
,
negbinomial
,
Poisson
,
quasipoisson
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.