\Header{stat.anova}{GLM Anova Statistics}
\keyword{regression}{stat.anova}
\keyword{models}{stat.anova}
\begin{Description}\relax
This is a utility function, used in \code{lm} and
\code{glm} methods for \code{\Link{anova}(..., test != NULL)}
and should not be used by the average user.\end{Description}
\begin{Usage}
\begin{verbatim}
stat.anova(table, test, scale, df.scale, n)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{table}] numeric matrix as results from
\code{\Link{anova.glm}(..., test=NULL)}.
\item[\code{test}] a character string, matching one of \code{"Chisq"},
\code{"F"} or \code{"Cp"}.
\item[\code{scale}] a weighted residual sum of squares.
\item[\code{df.scale}] degrees of freedom corresponding to scale.
\item[\code{n}] number of observations.
\end{ldescription}
\end{Arguments}
\begin{Value}
A matrix which is the original \code{table}, augmented by a column
of test statistics, depending on the \code{test} argument.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{anova.lm}}, \code{\Link{anova.glm}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
##-- Continued from  ``?glm'':

print(ag <- anova(glm.D93))
stat.anova(ag$table, test = "Cp",
           scale = sum(resid(glm.D93, "pearson")^2)/4, df = 4, n = 9)
\end{ExampleCode}
\end{Examples}

