glm.convert.Rd
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.
glm.convert(object)
object | An object of class |
---|
An object of class "glm"
with negative binomial family. The theta
parameter is then fixed at its present estimate.
Convenience function needed to effect some low level changes to the structure of the fitted model object.
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)#> Analysis of Deviance Table #> #> Model 1: Days ~ Sex/(Age + Eth * Lrn) #> Model 2: Days ~ Sex + Sex:Age + Sex:Eth + Sex:Lrn + Sex:Eth:Lrn + Sex:Age:Lrn #> Resid. Df Resid. Dev Df Deviance #> 1 132 167.56 #> 2 128 166.83 4 0.723