VGAM (version 1.0-4)

quasipoissonff: Quasi-Poisson Family Function

Description

Fits a generalized linear model to a Poisson response, where the dispersion parameter is unknown.

Usage

quasipoissonff(link = "loge", onedpar = FALSE,
               parallel = FALSE, zero = NULL)

Arguments

link

Link function. See Links for more choices.

onedpar

One dispersion parameter? If the response is a matrix, then a separate dispersion parameter will be computed for each response (column), by default. Setting onedpar=TRUE will pool them so that there is only one dispersion parameter to be estimated.

parallel

A logical or formula. Used only if the response is a matrix.

zero

Can be an integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The values must be from the set {1,2,…,\(M\)}, where \(M\) is the number of columns of the matrix response. See CommonVGAMffArguments for more information.

Value

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

Warning

See the warning in quasibinomialff.

Details

\(M\) defined above is the number of linear/additive predictors.

If the dispersion parameter is unknown, then the resulting estimate is not fully a maximum likelihood estimate.

A dispersion parameter that is less/greater than unity corresponds to under-/over-dispersion relative to the Poisson model. Over-dispersion is more common in practice.

When fitting a Quadratic RR-VGLM, the response is a matrix of \(M\), say, columns (e.g., one column per species). Then there will be \(M\) dispersion parameters (one per column of the response matrix).

References

McCullagh, P. and Nelder, J. A. (1989) Generalized Linear Models, 2nd ed. London: Chapman & Hall.

See Also

poissonff, negbinomial, loge, rrvglm, cqo, cao, binomialff, quasibinomialff, quasipoisson.

Examples

Run this code
# NOT RUN {
quasipoissonff()

# }
# NOT RUN {
n <- 200; p <- 5; S <- 5
mydata <- rcqo(n, p, S, fam = "poisson", eq.tol = FALSE)
myform <- attr(mydata, "formula")
p1 <- cqo(myform, fam = quasipoissonff, eq.tol = FALSE, data = mydata)
sort(deviance(p1, history = TRUE))  # A history of all the iterations
lvplot(p1, y = TRUE, lcol = 1:S, pch = 1:S, pcol = 1:S)
summary(p1)  # The dispersion parameters are estimated
# }

Run the code above in your browser using DataCamp Workspace