Skip to main content

Module influence

Module influence 

Source
Expand description

Influence diagnostics: which individual observations disproportionately move the fit.

This is a genuinely different question from “is the overall fit good” (crate::fit_statistics) or “are the residual assumptions met” (crate::residuals). An observation can have an unremarkable residual yet bend the whole regression line toward itself.

  • leverage — unusualness of an observation’s predictor values alone.
  • cooks_distance — leverage and residual size combined into one overall influence measure.
  • dffits — how much the fitted value for an observation moves when that observation is dropped.

§Threshold guidance (convention, not mathematical fact)

  • Leverage hᵢ > 2p/n (some use 3p/n) is often called high.
  • Cook’s distance Dᵢ > 4/n is a commonly cited flag.
  • |DFFITSᵢ| > 2·√(p/n) is a commonly cited flag.

These vary by source; treat them as convention.

Functions§

cooks_distance
Cook’s distance Dᵢ for each observation.
dffits
DFFITS for each observation.
leverage
Leverage hᵢ (the diagonal of the hat matrix) for each observation.