Method function to perform sequential likelihood ratio tests for Negative Binomial generalized linear models.
## S3 method for class 'negbin' anova(object, ..., test = "Chisq")
Fitted model object of class
Zero or more additional fitted model objects of class
Argument to match the
This function is a method for the generic function
anova() for class
It can be invoked by calling
anova(x) for an
x of the appropriate class, or directly by
anova.negbin(x) regardless of the
class of the object.
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
"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
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
m1 <- glm.nb(Days ~ Eth*Age*Lrn*Sex, quine, link = log) m2 <- update(m1, . ~ . - Eth:Age:Lrn:Sex) anova(m2, m1) anova(m2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.