anova.negbin(object, ..., test = "Chisq") anova(object, ..., test = "Chisq")
"negbin"
,
inheriting from classes
"glm"
and
"lm"
, specifying a Negative Binomial
fitted GLM. Typically the output of
glm.nb()
.
"negbin"
. They should form a nested
sequence of models, but need not be specified in any particular order.
test
argument of
anova.glm
. Ignored (with a warning if
changed) if a sequence of two or more Negative Binomial fitted model
objects is specified, but possibly used if only one object is
specified.
If only one fitted model object is specified, a sequential analysis of
deviance table is given for the fitted model. The
theta
parameter is kept fixed. If more
than one fitted model object is specified they must all be of class
"negbin"
and likelihood ratio tests are
done of each model within the next. In this case
theta
is assumed to have been
re-estimated for each model.
This function is a method for the generic function for classnegbin . It can be invoked by calling for an objectx of the appropriate class, or directly by calling regardless of the class of the object.
m1 <- glm.nb(Days ~ Eth*Age*Lrn*Sex, quine, link = log) m2 <- update(m1, . ~ . - Eth:Age:Lrn:Sex) anova(m2, m1) anova(m2)