# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.regression.linear.residualanalysis

## Class LMDiagnostics

• java.lang.Object
• com.numericalmethod.suanshu.stats.regression.linear.residualanalysis.LMDiagnostics

• public class LMDiagnostics
extends Object
This class collects some diagnostics measures for the goodness of fit based on the residulas for a linear regression model.

DFFITS is a diagnostic meant to show how influential a point is in a statistical regression. It is defined as the change, in the predicted value for a point, obtained when that point is left out of the regression, "studentized" by dividing by the estimated standard deviation of the fit at that point.

Cook's distance is a commonly used estimate of the influence of a data point. Cook's distance can be used in several ways: to indicate data points that are particularly worth checking for validity; to indicate regions of the design space where it would be good to be able obtain more data points.

Hadi proposed a measure of influence of the i-th observation based on the fact that influential observations are outliers in either the response variable or in the predictors, or both.

• ### Constructor Summary

Constructors
Constructor and Description
LMDiagnostics(LMResiduals residuals)
Constructs an instance of the Diagnostics from the results of residual analysis.
• ### Method Summary

All Methods
Modifier and Type Method and Description
ImmutableVector cookDistances()
Cook distances.
ImmutableVector DFFITS()
DFFITS, Welsch and Kuh Measure.
ImmutableVector Hadi()
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### LMDiagnostics

public LMDiagnostics(LMResiduals residuals)
Constructs an instance of the Diagnostics from the results of residual analysis.
Parameters:
residuals - the residual analysis of a linear regression
• ### Method Detail

• #### DFFITS

public ImmutableVector DFFITS()
DFFITS, Welsch and Kuh Measure.
Returns:
DFFITS
• "Chatterjee, Hadi and Price, "p.105 (4.23), Section 4.9.2, Regression Analysis by Example," 3rd edition, 2000. Wiley Series in Probability and Statistics."
• "David A. Belsley, Edwin Kuh, Roy E. Welsch, Regression diagnostics: identifying influential data and sources of collinearity. Wiley series in probability and mathematical statistics. New York: John Wiley & Sons. ISBN 0471058564. 1980."
• #### cookDistances

public ImmutableVector cookDistances()
Cook distances.
Returns:
Cook distances
public ImmutableVector Hadi()