Skip to contents

Formula: DFFITS_i = (e_i / (s_(i) sqrt(1 - h_ii))) sqrt(h_ii / (1 - h_ii))

Usage

Dffit(y, X, intercept = TRUE)

Arguments

y

Response vector, length n.

X

Design matrix with n rows. An intercept column is prepended unless intercept is FALSE.

intercept

Whether to prepend a column of ones.

Value

List with estimate (max |DFFITS|), dffits, threshold, flagged, n_influential, n, p, method.

Details

The cut-off is the Belsley-Kuh-Welsch size-adjusted 2 sqrt(p/n).

References

Belsley, Kuh & Welsch (1980), Regression Diagnostics, Wiley, ch. 2.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Dffit(V, V)
#> $estimate
#> [1] NaN
#> 
#> $dffits
#> [1] NaN NaN NaN NaN NaN NaN NaN NaN
#> 
#> $threshold
#> [1] 1
#> 
#> $flagged
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $n_influential
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $p
#> [1] 2
#> 
#> $method
#> [1] "DFFITS scaled change in fitted value when obs i deleted"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"