lsfit
) of a least squares regression model including the standard
deviation of the residuals, studentized residuals, and the standard
errors of the parameter estimates.
ls.diag(ls.out)
lsfit
.
hat
function).
hat
and
std.dev
to standardize the residuals.
hat
and a different estimate of the standard deviation.
i
-th row and
j
-th column is the measure of the
distance between the parameter estimates for the
j
-th regression
with and without the
i
-th observation.
i
-th element or row is the scaled difference
in fit with and without the
i
-th observation.
x
is the matrix of explanatory
variables for the non-missing observations.
The
cov.unscaled
matrix should be multiplied by the residual
variance (an element of
std.dev^2
) in order
to scale it for a particular y-value.
This function replaces the
ls.summary
function in New S from AT&T.
If you type
ls.summary
a warning will be given and
ls.diag
will be
used.
An observation is considered to be missing in the multivariate case
if any of the residuals for that observation is missing.
If there are weights, the residuals used are the raw residuals
multiplied by the square root of the weights.
The studentized residuals
stud.res
are very similar to the standardized
residuals except that for each observation a different estimate of the
standard deviation is used -- the estimate as if that observation were not
in the regression.
See Belsley, Kuh and Welsch (1980, p 14).
Belsley, D. A., Kuh, E. and Welsch, R. E. (1980).
Regression Diagnostics.
Wiley, New York.
Cook, R. D. and Weisberg, S. (1982).
Residuals and Influence in Regression.
Chapman and Hall, New York.
freeny.ls <- lsfit(freeny.x, freeny.y) freeny.diag <- ls.diag(freeny.ls)