TimeSeriesFunctions.DurbinWatsonStatistic Method

Returns the Durbin-Watson statistic for the specified residuals.

Definition

Namespace: Extreme.Statistics.TimeSeriesAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static double DurbinWatsonStatistic(
	this Vector<double> residuals
)

Parameters

residuals  Vector<Double>
Vector of residuals.

Return Value

Double
A value between 0 and 4.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The Durbin-Watson statistic is an indication of the autocorrelation of the residuals of a regression calculation. It can take on values between 0 and 4. A value close to zero indicates a positive autocorrelation between the residuals. A value close to 4 indicates a negative autocorrelation between the residuals. A value around 2 indicates there is no significant autocorrelation. For other values, a table of critical values of the Durbin-Watson statistic should be consulted.

The exact critical value for the Durbin-Watson distribution depends on the details of the regression problem itself and is difficult to calculate. For this reason, approximations are used that give upper and lower bounds. If the Durbin-Watson statistic lies between the bounds, the test is inconclusive.

Exceptions

ArgumentNullException

residuals is null.

See Also