Skip to contents

An outlier drags the fitted line toward itself and inflates the residual standard error, so the ordinary standardised residual understates how odd the point is, twice over. Deleting the point from the scale estimate breaks the circularity, which is why this version follows a t distribution.

Usage

Studrs(y, X)

Arguments

y

Response.

X

Design; supply your own intercept column.

Value

List with estimate, t, leverage, sigma, df, n.

Details

Formula: t_i = e_i / (s_(i) sqrt(1 - h_ii)), s_(i)^2 = [(n-p)s^2 - e_i^2/(1-h_ii)]/(n-p-1).

References

Weisberg, S. (2014). Applied Linear Regression, 4th ed, section 9.1; Belsley, Kuh & Welsch (1980), Regression Diagnostics, ch 2.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Studrs(V, V)
#> $estimate
#> [1] 1.920271
#> 
#> $t
#> [1] 0.1571999 0.3187640 0.6633107 0.6764709 0.6946017 1.6695392 1.7730272
#> [8] 1.9202711
#> 
#> $leverage
#> [1] 0.004901961 0.019607843 0.044117647 0.078431373 0.122549020 0.176470588
#> [7] 0.240196078 0.313725490
#> 
#> $sigma
#> [1] 1.313634e-15
#> 
#> $df
#> [1] 6
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Externally studentized residuals"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"