\Header{residuals}{Extract Model Residuals}
\alias{resid}{residuals}
\methalias{residuals.default}{residuals}
\keyword{models}{residuals}
\keyword{regression}{residuals}
\begin{Description}\relax
\code{residuals} is a generic function which extracts model residuals
from objects returned by modeling functions.

The abbreviated form \code{resid} is an alias for \code{residuals}.
It is intended to encourage users to access object components through
an accessor function rather than by directly referencing an object
slot.

All object classes which are returned by model fitting functions
should provide a \code{residuals} method.  (Note that the method is
`residuals' and not `resid'.)\end{Description}
\begin{Usage}
\begin{verbatim}
residuals(x, ...)
resid(x, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an object for which the extraction of model residuals is
meaningful.
\item[\code{...}] other arguments.
\end{ldescription}
\end{Arguments}
\begin{Value}
Residuals extracted from the object \code{x}.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{coefficients}}, \code{\Link{fitted.values}},
\code{\Link{glm}}, \code{\Link{lm}}.\end{SeeAlso}

