\HeaderA{anova.negbin}{Likelihood Ratio Tests for Negative Binomial GLMs}{anova.negbin}
\keyword{regression}{anova.negbin}
\begin{Description}\relax
Method function to perform sequential likelihood ratio tests for Negative
Binomial generalized linear models.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'negbin':
anova(object, ..., test = "Chisq")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] Fitted model object of class \code{"negbin"}, inheriting from
classes \code{"glm"} and \code{"lm"}, specifying a Negative Binomial
fitted GLM.  Typically the output of \code{\LinkA{glm.nb}{glm.nb}()}.

\item[\code{...}] Zero or more additional fitted model objects of class \code{"negbin"}.  They
should form a nested sequence of models, but need not be specified in any
particular order.

\item[\code{test}] Argument to match the \code{test} argument of \code{\LinkA{anova.glm}{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.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function is a method for the generic function
\code{anova()} for class \code{"negbin"}.
It can be invoked by calling \code{anova(x)} for an
object \code{x} of the appropriate class, or directly by
calling \code{anova.negbin(x)} regardless of the
class of the object.
\end{Details}
\begin{Note}\relax
If only one fitted model object is specified, a sequential analysis of
deviance table is given for the fitted model.  The \code{theta} parameter is kept
fixed.  If more than one fitted model object is specified they must all be
of class \code{"negbin"} and likelihood ratio tests are done of each model within
the next.  In this case \code{theta} is assumed to have been re-estimated for each
model.
\end{Note}
\begin{References}\relax
Venables, W. N. and Ripley, B. D. (2002)
\emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{glm.nb}{glm.nb}}, \code{\LinkA{negative.binomial}{negative.binomial}}, \code{\LinkA{summary.negbin}{summary.negbin}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
m1 <- glm.nb(Days ~ Eth*Age*Lrn*Sex, quine, link = log)
m2 <- update(m1, . ~ . - Eth:Age:Lrn:Sex)
anova(m2, m1)
anova(m2)
\end{ExampleCode}
\end{Examples}

