Skip to contents

Formula: COVRATIO_i = (s_(i)^2 / s^2)^p / (1 - h_ii)

Usage

Covrat(y, X, intercept = TRUE)

Arguments

y

Response vector, length n.

X

Design matrix with n rows.

intercept

Whether to prepend a column of ones.

Value

List with estimate (max |COVRATIO - 1|), covratio, threshold, flagged, n_influential, n, p, method.

Details

It is the ratio of generalised variances det(s_(i)^2 (X_(i)'X_(i))^-1) / det(s^2 (X'X)^-1). Values far from 1 mark observations that change the precision; the Belsley-Kuh-Welsch cut-off is |COVRATIO - 1| > 3p/n.

References

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

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Covrat(V, V)
#> $estimate
#> [1] NaN
#> 
#> $covratio
#> [1] NaN NaN NaN NaN NaN NaN NaN NaN
#> 
#> $threshold
#> [1] 0.75
#> 
#> $flagged
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $n_influential
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $p
#> [1] 2
#> 
#> $method
#> [1] "COVRATIO deletion effect on the covariance of beta-hat"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"