Which single case determines my result? (influential cases: leverage, studentised residual, Cook's distance)
In brief
A single case can bend a regression line strongly. Three numbers help: the leverage shows how far the case lies at the edge of the predictor. The studentised residual shows how far it lies beside the line. Cook's distance combines both and shows how strongly the result would change if the case were missing.
An example by hand
Seven people: x = hours of screen time in the evening (1, 2, 3, 4, 5, 6 and 12), y = sleep quality (14, 13, 12, 9, 5, 9 and 3). The line is ŷ = 14 − x, the sum of squares of the residuals is 22. Person 7 sits far out at the edge with 12 hours.
Leverage: h = 1 : n + (x − mean)² : Σ(x − mean)². The mean of x is 33 : 7 = 4.714, the sum of squared deviations 79.43. So h = 0.143 + 0.668 = 0.811. The average of all leverages would be 2 : 7 = 0.29, person 7 is far above.
Residual: the line predicts the value 2 for x = 12, measured is 3, so the residual is +1. That is small: person 7 lies almost on the line. The studentised residual is 1.13, so inconspicuous.
Cook's distance: D = residual² · h : (k · s² · (1 − h)²) = 1 · 0.811 : (2 · 4.4 · 0.0357) = 2.58. The rule of thumb 4 : 7 = 0.57 is far exceeded: person 7 has pulled the line towards herself. Person 5, by contrast, lies far beside the line with residual −4 and studentised residual −4.75, her Cook's distance is only 0.36.
How to read it
- Leverage: depends only on the predictors. Rule of thumb in Statable: 2 · (k + 1) : n, k = number of predictors.
- Studentised residual: the residual divided by its own standard error, leaving the case out for the spread. Conspicuous from an absolute value above 2; with a suitable model this hits about one case in twenty.
- Cook's distance: rule of thumb 4 : n; from 1 the influence is very strong. Some sources name 0.5; these are rules of thumb, not laws.
- DFFITS and DFBETAS: how strongly the prediction for the case (DFFITS) or a single B (DFBETAS) changes when the case is missing.
How it works in Statable
- Run a linear regression (card "Can something be predicted?").
- Under the result open "Checking the regression: collinearity and unusual cases". The table "Cases that stand out" gives the row in the data, studentised residual, leverage, Cook's distance, DFFITS and DFBETAS.
- Example "Cars", step "Model 1: weight only": the Chrysler Imperial (row 17) has Cook's distance 0.532, studentised residual 2.33 and leverage 0.184 (limit 0.125). The Fiat 128 (row 18) stands out only through its residual 2.54.
- Look at the row in the data view. Cases stay in the data; nothing is deleted automatically.
What is often misunderstood
- A small residual does not mean a case is harmless: with high leverage the case pulls the line towards itself and therefore lies close to it.
- A large residual does not mean a case is influential: in the middle of the cloud it hardly shifts the line.
- Conspicuous does not mean wrong. First check (typing error? another group?), then calculate with and without the case and report both.
For specialists
Leverage h_ii = x_i′(X′X)⁻¹x_i (diagonal of the hat matrix), mean k : n with k = number of parameters including the constant. Studentised (external): r_i = e_i : (s₍ᵢ₎ · √(1 − h_ii)). Cook: D_i = r̃_i² · h_ii : (k · (1 − h_ii)) with the internally standardised residual r̃_i; DFFITS = r_i · √(h_ii : (1 − h_ii)). Statable marks |r_i| > 2, D_i > 4 : n and h_ii > 2k : n; the calculation follows R lm, hatvalues, rstudent, cooks.distance.
Sources
Cook, R. D. (1977). Detection of influential observation in linear regression. Technometrics, 19, 15-18. Belsley, D. A., Kuh, E. & Welsch, R. E. (1980). Regression Diagnostics. Wiley. Cohen, J., Cohen, P., West, S. G. & Aiken, L. S. (2003). Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences. Erlbaum.