Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

glm.convert

Change a Negative Binomial fit to a GLM fit


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

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

Examples

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

Support Functions and Datasets for Venables and Ripley's MASS

v7.3-54
GPL-2 | GPL-3
Authors
Brian Ripley [aut, cre, cph], Bill Venables [ctb], Douglas M. Bates [ctb], Kurt Hornik [trl] (partial port ca 1998), Albrecht Gebhardt [trl] (partial port ca 1998), David Firth [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.