Cook's Distance Plot Calculator

Analyze regression influence, detect impactful observations, compare thresholds, inspect residual diagnostics, and export interactive Cook’s distance results for confident machine learning decisions and reporting.

Cook's Distance Results

Interactive Influence Plot

Selected Observation

Regression Coefficients

TermCoefficient

          

Observation Diagnostics

ObservationLabelActualPredictedResidual Std. residualStudentizedLeverageCook's D ThresholdStatusRankNote

1. Enter or Import Data

The first row can contain headers. Commas, tabs, and semicolons are detected automatically.

2. Select Variables and Model

Use Ctrl or Command to select multiple columns.

3. Influence Threshold and Plot Options

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

  1. Paste data or upload a CSV file.
  2. Parse the data and select target and predictor columns.
  3. Choose regression, scaling, missing-value, and threshold settings.
  4. Calculate the model and inspect highlighted observations.
  5. Click plotted points for details, notes, and temporary exclusion.
  6. Export the plot, diagnostics, summary, or complete JSON results.

Example Data

IDAdvertisingPriceSales
A12924
B18831
C25742
D80597

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.

Related Calculators

Regression Line PlotPolynomial Regression CurveActual-versus-Predicted PlotResidual PlotResidual Distribution PlotQ-Q Plot of ResidualsScale-Location PlotLeverage PlotPrediction Interval PlotPartial Regression Plot

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.