\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
\samp{residuals} and not \samp{resid}.)

Methods can make use of \code{\Link{naresid}} methods to compensate
for the omission of missing values.  The default method does.\end{Description}
\begin{Usage}
\begin{verbatim}
residuals(object, ...)
resid(object, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] 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{object}.\end{Value}
\begin{References}\relax
Chambers, J. M. and Hastie, T. J. (1992)
\emph{Statistical Models in S}.
Wadsworth \& Brooks/Cole.\end{References}
\begin{SeeAlso}\relax
\code{\Link{coefficients}}, \code{\Link{fitted.values}},
\code{\Link{glm}}, \code{\Link{lm}}.\end{SeeAlso}

