Durbin-Watson

From ZCubes Wiki
Revision as of 09:06, 19 August 2020 by Sahiti (talk | contribs)
Jump to navigation Jump to search
DURBINWATSONTEST(DataRange,ConfidenceLevel,NewTableFlag)
  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle DataRange} is the array of x and y values.
  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle ConfidenceLevel} is the value of alpha from 0 to 1.
  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle NewTableFlag} is either TRUE or FALSE. TRUE for getting results in a new cube. FALSE will display results in the same cube.

DESCRIPTION

  • This function gives the test statistic of the Durbin-Watson test.
  • The test is used to detect the presence of autocorrelation in the residuals.
  • Autocorrelation means that adjacent observations are correlated.
  • If they are correlated, then least-squares regression underestimates the standard error of the coefficients.

ASSUMPTIONS

The error terms are independent of each other.

  • The Durbin-Watson test uses the following statistic:
  • where the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle e_i = y_i-\bar{y_i}} are the residuals.
  • n is the number of elements in the sample.
  • k is the number of independent variables.
  • d takes the values between 0 and 4.
* d = 2 means there is no autocorrelation.
* A value substantially below 2 means that the data is positively autocorrelated.
* A value of d substantially above 2 means that the data is negatively autocorrelated.

RESULT

* if D > upper bound, no correlation exists.
* if D < lower bound, positive correlation exists.
* if D is in between the two bounds, the test is inconclusive.

EXAMPLE

Spreadsheet
A B C D
1 3 7 5 65
2 4 3 7 38
3 5 5 8 51
4 6 8 1 38
5 7 9 3 55
6 8 5 4 43
7 2 4 0 25
8 3 2 6 33
9 8 8 7 71
10 9 6 4 51
11 2 9 2 49

=DURBINWATSONTEST([A1:A11, B1:B11, C1:C11, D1:D11], 0.05, true)

DURBIN-WATSON TEST
Y PREDICTED Y RESIDUAL
65 54.11461 10.88539
38 42.54638 -4.54638
51 56.06668 -5.06668
38 44.9235 -6.9235
55 57.33098 -2.33098
43 42.08043 0.91957
25 21.06987 3.93013
33 33.82123 -0.82123
71 67.51283 3.48717
51 47.12326 3.87674
49 52.41022 -3.41022
SUMMARY
VARIABLE RESULT
D 1.37587
DL TABLE 0.595
DU TABLE 1.928
RESULT TEST IS INCONCLUSIVE
  • CONCLUSION: As, DL TABLE < D < DU TABLE, Test is inconclusive.