For observations \(1, 2, \ldots, n\), let:
\(Y_i\) denote the response value for the \(i\)th observation.
\(\hat{Y}_i\) denote the fitted value for the
\(i\)th observation.
\(h_i\) denote the leverage value for the \(i\)th observation.
We assume that \(\mathrm{sd}(Y_i) = \sigma\) for
\(i \in \{1, 2, \ldots, n\}\) and that \(\hat{\sigma}\)
is the estimate produced by sigma(x)
, where x
is the fitted model object.
The ordinary residual for the \(i\)th
observation is computed as
$$\hat{\epsilon}_i = Y_i - \hat{Y}_i.$$
The variance of the i
th ordinary residual under standard
assumptions is \(\sigma^2(1-h_i)\).
The standardized residual for the \(i\)th observation
is computed as
$$r_i = \frac{\hat{\epsilon}_i}{\hat{\sigma}\sqrt{1-h_i}}.$$
The standardized residual is also known as the internally
studentized residual.
Let \(\hat{Y}_{i(i)}\) denote the predicted value of
\(Y_i\) for the model fit with all \(n\) observations
except observation \(i\). The leave-one-out (LOO) residual for observation \(i\) is
computed as
$$l_i = Y_i - \hat{Y}_{i(i)} = \frac{\hat{\epsilon}_i}{1-h_i}.$$
The LOO residual is also known as the deleted or jackknife
residual.
The studentized residual for the \(i\)th observation
is computed as
$$t_i = \frac{l_i}{\hat{\sigma}_{(i)}\sqrt{1-h_i}},$$
where \(\hat{\sigma}_{(i)}\) is the leave-one-out estimate
of \(\sigma\).
The studentized residual is also known as the externally
studentized residual.