Cook's Distance Results
Interactive Influence Plot
Selected Observation
Regression Coefficients
| Term | Coefficient |
|---|
Observation Diagnostics
| Observation | Label | Actual | Predicted | Residual | Std. residual | Studentized | Leverage | Cook's D | Threshold | Status | Rank | Note |
|---|
Formula Used
Cook's distance:
Di = [ei2 / (p × MSE)] × [hii / (1 − hii)2]
Here, ei is the residual, hii is leverage, p is the fitted parameter count, and MSE is mean squared error.
Cook's distance estimates how strongly one observation affects fitted regression results. Larger values deserve investigation, not automatic deletion. Compare influence with leverage, residuals, domain knowledge, and data quality.
How to Use
- Paste data or upload a CSV file.
- Parse the data and select target and predictor columns.
- Choose regression, scaling, missing-value, and threshold settings.
- Calculate the model and inspect highlighted observations.
- Click plotted points for details, notes, and temporary exclusion.
- Export the plot, diagnostics, summary, or complete JSON results.
Example Data
| ID | Advertising | Price | Sales |
|---|---|---|---|
| A | 12 | 9 | 24 |
| B | 18 | 8 | 31 |
| C | 25 | 7 | 42 |
| D | 80 | 5 | 97 |
Interpretation Guide
D > 1: Often treated as a strong influence warning.
D > 4/n: A sensitive screening rule for moderate datasets.
High leverage with a small residual: Unusual predictor values may still fit the model well.
Large residual with low leverage: The response is unusual, but coefficient influence may remain limited.
Frequently Asked Questions
What does Cook's distance measure?
It measures how much fitted regression results change when one observation is removed.
Should every point above the threshold be deleted?
No. Investigate measurement quality, context, leverage, residual size, and model assumptions first.
Which threshold is best?
No universal threshold exists. Use 1, 4/n, and 4/(n-p-1) as practical screening references.
What is leverage?
Leverage measures how unusual an observation's predictor values are compared with other observations.
Can categorical predictors be used?
Yes. This calculator can dummy encode categorical predictor levels automatically.
Why can Cook's distance become very large?
Large residuals, extreme leverage, or leverage values near one can produce very large distances.
Does scaling change Cook's distance?
Consistent linear scaling generally preserves fitted predictions, though transformed model terms can affect interpretation.
What happens after excluding a point?
The calculator refits the model and compares key results against the original fit.
Can this diagnose nonlinear relationships?
Polynomial terms can help, but residual plots and subject knowledge should guide model selection.
Why is the matrix singular?
Predictors may be duplicated, constant, perfectly correlated, or too numerous for available observations.