\Header{influence.measures}{Regression Diagnostics}
\alias{print.infl}{influence.measures}
\alias{summary.infl}{influence.measures}
\alias{hat}{influence.measures}
\alias{rstudent}{influence.measures}
\alias{dfbetas}{influence.measures}
\alias{dffits}{influence.measures}
\alias{covratio}{influence.measures}
\alias{cooks.distance}{influence.measures}
\keyword{regression}{influence.measures}
\begin{Usage}
\begin{verbatim}
influence.measures(lm.obj)
summary.infl (object, digits = max(2, .Options$digits - 5), ...)
  print.infl (x, digits = max(3, .Options$digits - 4), ...)

rstandard(lm.obj)
rstudent(lm.obj)
dfbetas(lm.obj)
dffits(lm.obj)
covratio(lm.obj)
cooks.distance(lm.obj)
hat(xmat)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{lm.obj}] the results returned by \texttt{lm}.
\item[\texttt{xmat}] the `X' or design matrix.
\end{ldescription}
\end{Arguments}
\begin{Description}
This suite of functions can be used to compute some of the regression
diagnostics discussed in Belsley, Kuh and Welsch (1980), and in Cook
and Weisberg (1982).

The primary function is \texttt{influence.measures} which produces a
class \texttt{"infl"} object tabular display showing the DFBETAS for
each model variable, DFFITS, covariance ratios, Cook's distances and
the diagonal elements of the hat matrix.  Cases which are influential
with respect to any of these measures are marked with an asterisk.

The functions \texttt{rstudent}, \texttt{dfbetas}, \texttt{dffits},
\texttt{covratio} and \texttt{cooks.distance} provide direct access to the
corresponding diagnostic quantities.\end{Description}
\begin{References}
Belsley, D. A., E. Kuh and R. E. Welsch (1980).
\emph{Regression Diagnostics.}
New York: Wiley.

Cook, R. D. and S. Weisberg (1982).
\emph{Residuals and Influence in Regression.}
London: Chapman and Hall.\end{References}
\begin{SeeAlso}
\texttt{\Link{lm.influence}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Analysis of the life-cycle savings data
## given in Belsley, Kuh and Welsch.
data(savings)
lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = savings)
summary(inflm.SR <- influence.measures(lm.SR))
inflm.SR
which(apply(inflm.SR$is.inf, 1, any)) # which observations `are' influential
dim(dfb <- dfbetas(lm.SR))            # the 1st columns of influence.measures
all(dfb == inflm.SR$infmat[, 1:5])
rstudent(lm.SR)
dffits(lm.SR)
covratio(lm.SR)

## Huber's data [Atkinson 1985]
xh <- c(-4:0, 10)
yh <- c(2.48, .73, -.04, -1.44, -1.32, 0)
summary(lmH <- lm(yh ~ xh))
influence.measures(lmH)
\end{ExampleCode}
\end{Examples}

