regression_diagnostics/influence/mod.rs
1//! Influence diagnostics: which individual observations disproportionately move
2//! the fit.
3//!
4//! This is a genuinely different question from "is the overall fit good"
5//! ([`crate::fit_statistics`]) or "are the residual assumptions met"
6//! ([`crate::residuals`]). An observation can have an unremarkable residual yet
7//! bend the whole regression line toward itself.
8//!
9//! * [`leverage`] — unusualness of an observation's *predictor* values alone.
10//! * [`cooks_distance`] — leverage **and** residual size combined into one
11//! overall influence measure.
12//! * [`dffits`] — how much the fitted value for an observation moves when that
13//! observation is dropped.
14//!
15//! ## Threshold guidance (convention, not mathematical fact)
16//!
17//! * Leverage `hᵢ > 2p/n` (some use `3p/n`) is often called high.
18//! * Cook's distance `Dᵢ > 4/n` is a commonly cited flag.
19//! * `|DFFITSᵢ| > 2·√(p/n)` is a commonly cited flag.
20//!
21//! These vary by source; treat them as convention.
22
23mod cooks_distance;
24mod dffits;
25mod leverage;
26
27pub use cooks_distance::cooks_distance;
28pub use dffits::dffits;
29pub use leverage::leverage;