pospoisson {VGAM} | R Documentation |
Positive Poisson Distribution Family Function
Description
Fits a positive Poisson distribution.
Usage
pospoisson(link = "loglink", type.fitted = c("mean", "lambda",
"prob0"), expected = TRUE, ilambda = NULL, imethod = 1,
zero = NULL, gt.1 = FALSE)
Arguments
link |
Link function for the usual mean (lambda) parameter of
an ordinary Poisson distribution.
See |
expected |
Logical.
Fisher scoring is used if |
ilambda , imethod , zero |
See |
type.fitted |
See |
gt.1 |
Logical.
Enforce |
Details
The positive Poisson distribution is the ordinary Poisson
distribution but with the probability of zero being zero. Thus the
other probabilities are scaled up (i.e., divided by ).
The mean,
,
can be obtained by the extractor function
fitted
applied to
the object.
A related distribution is the zero-inflated Poisson, in which the
probability involves another parameter
.
See
zipoisson
.
Value
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.
Warning
Under- or over-flow may occur if the data is ill-conditioned.
Note
This family function can handle multiple responses.
Yet to be done: a quasi.pospoisson
which estimates a dispersion
parameter.
Author(s)
Thomas W. Yee
References
Coleman, J. S. and James, J. (1961). The equilibrium size distribution of freely-forming groups. Sociometry, 24, 36–45.
See Also
Gaitdpois
,
gaitdpoisson
,
posnegbinomial
,
poissonff
,
zapoisson
,
zipoisson
,
simulate.vlm
,
otpospoisson
,
Pospois
.
Examples
# Data from Coleman and James (1961)
cjdata <- data.frame(y = 1:6, freq = c(1486, 694, 195, 37, 10, 1))
fit <- vglm(y ~ 1, pospoisson, data = cjdata, weights = freq)
Coef(fit)
summary(fit)
fitted(fit)
pdata <- data.frame(x2 = runif(nn <- 1000)) # Artificial data
pdata <- transform(pdata, lambda = exp(1 - 2 * x2))
pdata <- transform(pdata, y1 = rgaitdpois(nn, lambda, truncate = 0))
with(pdata, table(y1))
fit <- vglm(y1 ~ x2, pospoisson, data = pdata, trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)