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)
lm.obj
|
the results returned by lm .
|
xmat
| the `X' or design matrix. |
The primary function is influence.measures
which produces a
class "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 rstudent
, dfbetas
, dffits
,
covratio
and cooks.distance
provide direct access to the
corresponding diagnostic quantities.
Cook, R. D. and S. Weisberg (1982). Residuals and Influence in Regression. London: Chapman and Hall.
lm.influence
.## 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)