| lm.influence {base} | R Documentation |
Regression Diagnostics
Description
This function provides the basic quantities which are used in forming a wide variety of diagnostics for checking the quality of regression fits.
Usage
influence(model, ...)
influence.lm (model, do.coef = TRUE, ...)
influence.glm(model, do.coef = TRUE, ...)
lm.influence(model, do.coef = TRUE)
Arguments
model |
an object as returned by |
do.coef |
logical indicating if the changed |
... |
further arguments passed to or from other methods. |
Details
The influence.measures() and other functions listed in
See Also provide a more user oriented way of computing a
variety of regression diagnostics. These all build on
lm.influence.
Value
A list containing the following components of the same length or
number of rows n, which is the number of non-zero weights.
hat |
a vector containing the diagonal of the “hat” matrix. |
coefficients |
(unless |
sigma |
a vector whose i-th element contains the estimate of the residual standard deviation obtained when the i-th case is dropped from the regression. |
wt.res |
a vector of weighted (or for class |
Note
The coefficients returned by the R version
of lm.influence differ from those computed by S.
Rather than returning the coefficients which result
from dropping each case, we return the changes in the coefficients.
This is more directly useful in many diagnostic measures.
Since these need O(n^2 p) computing time, they can be omitted by
do.coef = FALSE.
Note that cases with weights == 0 are dropped (contrary
to the situation in S).
If a model has been fitted with na.action=na.exclude (see
na.exclude), cases excluded in the fit are
considered here.
References
See the list in the documentation for influence.measures.
Chambers, J. M. (1992) Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth \& Brooks/Cole.
See Also
summary.lm for summary and related methods;
influence.measures,
hat for the hat matrix diagonals,
dfbetas,
dffits,
covratio,
cooks.distance,
lm.
Examples
## Analysis of the life-cycle savings data
## given in Belsley, Kuh and Welsch.
data(LifeCycleSavings)
summary(lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi,
data = LifeCycleSavings),
corr = TRUE)
str(lmI <- lm.influence(lm.SR))
## For more `user level' examples, use example(influence.measures)