Skip to main content

dffits

Function dffits 

Source
pub fn dffits(fit: &OlsFit) -> Array1<f64>
Expand description

DFFITS for each observation.

DFFITSᵢ = tᵢ · √(hᵢ / (1 − hᵢ))

where tᵢ is the externally studentized residual and hᵢ the leverage. It measures, in standard-error units, how much observation i’s own fitted value changes when that observation is deleted from the fit — a leave-one-out influence measure.

A commonly cited flag is |DFFITSᵢ| > 2·√(p/n) (convention, not a hard rule).

DFFITS uses the external (leave-one-out) residual scale, whereas cooks_distance uses the internal one; the two normally agree, but DFFITS reacts more sharply to a lone extreme outlier since that point is excluded from the scale it is judged against. Entries are NaN where the external studentized residual is undefined (n − p − 1 < 1).