\HeaderA{lm.summaries}{Accessing Linear Model Fits}{lm.summaries}
\aliasA{family.lm}{lm.summaries}{family.lm}
\aliasA{formula.lm}{lm.summaries}{formula.lm}
\aliasA{labels.lm}{lm.summaries}{labels.lm}
\aliasA{residuals.lm}{lm.summaries}{residuals.lm}
\aliasA{weights}{lm.summaries}{weights}
\methaliasA{weights.default}{lm.summaries}{weights.default}
\keyword{regression}{lm.summaries}
\keyword{models}{lm.summaries}
\begin{Description}\relax
All these functions are \code{\LinkA{methods}{methods}} for class \code{"lm"}  objects.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'lm':
family(object, ...)

## S3 method for class 'lm':
formula(x, ...)

## S3 method for class 'lm':
residuals(object,
          type = c("working", "response", "deviance", "pearson",
                   "partial"),
          ...)

## S3 method for class 'lm':
labels(object, ...)

weights(object, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object, x}] an object inheriting from class \code{lm}, usually
the result of a call to \code{\LinkA{lm}{lm}} or \code{\LinkA{aov}{aov}}.
\item[\code{...}] further arguments passed to or from other methods.
\item[\code{type}] the type of residuals which should be returned.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The generic accessor functions \code{coef}, \code{effects},
\code{fitted} and \code{residuals} can be used to extract
various useful features of the value returned by \code{lm}.

The working and response residuals are \sQuote{observed - fitted}.  The
deviance and pearson residuals are weighted residuals, scaled by the
square root of the weights used in fitting.  The partial residuals
are a matrix with each column formed by omitting a term from the
model.  In all these, zero weight cases are never omitted (as opposed
to the standardized \code{\LinkA{rstudent}{rstudent}} residuals, and the
\code{\LinkA{weighted.residuals}{weighted.residuals}}).

How \code{residuals} treats cases with missing values in the original
fit is determined by the \code{na.action} argument of that fit.
If \code{na.action = na.omit} omitted cases will not appear in the
residuals, whereas if \code{na.action = na.exclude} they will appear,
with residual value \code{NA}.  See also \code{\LinkA{naresid}{naresid}}.

The \code{"lm"} method for generic \code{\LinkA{labels}{labels}} returns the
term labels for estimable terms, that is the names of the terms with
an least one estimable coefficient.
\end{Details}
\begin{References}\relax
Chambers, J. M. (1992)
\emph{Linear models.}
Chapter 4 of \emph{Statistical Models in S}
eds J. M. Chambers and T. J. Hastie, Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
The model fitting function \code{\LinkA{lm}{lm}}, \code{\LinkA{anova.lm}{anova.lm}}.

\code{\LinkA{coef}{coef}}, \code{\LinkA{deviance}{deviance}},
\code{\LinkA{df.residual}{df.residual}},
\code{\LinkA{effects}{effects}}, \code{\LinkA{fitted}{fitted}},
\code{\LinkA{glm}{glm}} for \bold{generalized} linear models,
\code{\LinkA{influence}{influence}} (etc on that page) for regression diagnostics,
\code{\LinkA{weighted.residuals}{weighted.residuals}},
\code{\LinkA{residuals}{residuals}}, \code{\LinkA{residuals.glm}{residuals.glm}},
\code{\LinkA{summary.lm}{summary.lm}}.

\LinkA{influence.measures}{influence.measures} for deletion diagnostics, including
standardized (\code{\LinkA{rstandard}{rstandard}})
and studentized (\code{\LinkA{rstudent}{rstudent}}) residuals.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

##-- Continuing the  lm(.) example:
coef(lm.D90)# the bare coefficients

## The 2 basic regression diagnostic plots [plot.lm(.) is preferred]
plot(resid(lm.D90), fitted(lm.D90))# Tukey-Anscombe's
abline(h=0, lty=2, col = 'gray')

qqnorm(residuals(lm.D90))
\end{ExampleCode}
\end{Examples}

