glm.convert: Change a Negative Binomial fit to a GLM fit

Description Usage Arguments Details Value See Also Examples

View source: R/negbin.R

Description

This function modifies an output object from glm.nb() to one that looks like the output from glm() with a negative binomial family. This allows it to be updated keeping the theta parameter fixed.

Usage

1
glm.convert(object)

Arguments

object

An object of class "negbin", typically the output from glm.nb().

Details

Convenience function needed to effect some low level changes to the structure of the fitted model object.

Value

An object of class "glm" with negative binomial family. The theta parameter is then fixed at its present estimate.

See Also

glm.nb, negative.binomial, glm

Examples

1
2
3
4
quine.nb1 <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine)
quine.nbA <- glm.convert(quine.nb1)
quine.nbB <- update(quine.nb1, . ~ . + Sex:Age:Lrn)
anova(quine.nbA, quine.nbB)

MASS documentation built on May 29, 2017, 7:08 p.m.

Search within the MASS package
Search all R packages, documentation and source code