Cookdist

version 1.0.0.0 (3.84 KB) by Antonio Trujillo-Ortiz
Cook's distance influence index.

2.2K Downloads

Updated 14 Nov 2005

View License

This quantity measures how much the entire regression function changes when the i-th observation is deleted. Should be comparable to F_p,n-p: if the 'p-value' of D_i is 50 percent or more, then the i-th point is likely influential: investigate this point further. Cook's distance (D_i) is an influence measure based on the difference between the regression parameter estimates b and what they become if the i-th data point is removed, b_-1.

The usual criterion is that a point is influential if D_i exceeds the median of the F_p,n-p distribution, where p is the number of regression coefficients (including the intercept) and n the number of data.

Inputs:
D - matrix data (=[X Y]) (last column must be the Y-dependent variable). (X-independent variable entry can be for a simple [X], multiple [X1,X2,X3,...Xp] or polynomial [X,X^2,X^3,...,X^p] regression model).

Outputs:
A complete summary (table and/or plot) of the Cook's influence index. For the graph, the cross-hair can be positioned with the mouse at the selected location.

NOTE.-One should be careful. This procedure it is not a conclusive test to detect any outliers on regression models, but unusual observations by its very high leverage and high influence values. For such a case you should to check it under the appropriate assumptions.

Cite As

Antonio Trujillo-Ortiz (2022). Cookdist (https://www.mathworks.com/matlabcentral/fileexchange/8716-cookdist), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!