Durbin–Watson statistic

In statistics, the Durbin–Watson statistic is a test statistic used to detect the presence of autocorrelation at lag 1 in the residuals (prediction errors) from a regression analysis. It is named after James Durbin and Geoffrey Watson. The small sample distribution of this ratio was derived by John von Neumann (von Neumann, 1941). Durbin and Watson (1950, 1951) applied this statistic to the residuals from least squares regressions, and developed bounds tests for the null hypothesis that the errors are serially uncorrelated against the alternative that they follow a first order autoregressive process. Note that the distribution of this test statistic does not depend on the estimated regression coefficients and the variance of the errors.[1]

A similar assessment can be also carried out with the Breusch–Godfrey test and the Ljung–Box test.

Computing and interpreting the Durbin–Watson statistic

If et is the residual given by Durbin -Watson statistic states that null hypothesis: , alternative hypothesis , then the test statistic is

where T is the number of observations. If one has a lengthy sample, then this can be linearly mapped to the Pearson correlation of the time-series data with its lags.[2] Since d is approximately equal to 2(1  ), where is the sample autocorrelation of the residuals,[3] d = 2 indicates no autocorrelation. The value of d always lies between 0 and 4. If the Durbin–Watson statistic is substantially less than 2, there is evidence of positive serial correlation. As a rough rule of thumb, if Durbin–Watson is less than 1.0, there may be cause for alarm. Small values of d indicate successive error terms are positively correlated. If d > 2, successive error terms are negatively correlated. In regressions, this can imply an underestimation of the level of statistical significance.

To test for positive autocorrelation at significance α, the test statistic d is compared to lower and upper critical values (dL,α and dU,α):

  • If d < dL,α, there is statistical evidence that the error terms are positively autocorrelated.
  • If d > dU,α, there is no statistical evidence that the error terms are positively autocorrelated.
  • If dL,α < d < dU,α, the test is inconclusive.

Positive serial correlation is serial correlation in which a positive error for one observation increases the chances of a positive error for another observation.

To test for negative autocorrelation at significance α, the test statistic (4  d) is compared to lower and upper critical values (dL,α and dU,α):

  • If (4 − d) < dL,α, there is statistical evidence that the error terms are negatively autocorrelated.
  • If (4  d) > dU,α, there is no statistical evidence that the error terms are negatively autocorrelated.
  • If dL,α < (4 − d) < dU,α, the test is inconclusive.

Negative serial correlation implies that a positive error for one observation increases the chance of a negative error for another observation and a negative error for one observation increases the chances of a positive error for another.

The critical values, dL,α and dU,α, vary by level of significance (α) and the degrees of freedom in the regression equation. Their derivation is complex—statisticians typically obtain them from the appendices of statistical texts.

If the design matrix of the regression is known, exact critical values for the distribution of under the null hypothesis of no serial correlation can be calculated. Under the null hypothesis is distributed as

where n are the number of observations and k the number of regression variables; the are independent standard normal random variables; and the are the nonzero eigenvalues of where is the matrix that transforms the residuals into the statistic, i.e. .[4] A number of computational algorithms for finding percentiles of this distribution are available.[5]

Although serial correlation does not affect the consistency of the estimated regression coefficients, it does affect our ability to conduct valid statistical tests. First, the F-statistic to test for overall significance of the regression may be inflated under positive serial correlation because the mean squared error (MSE) will tend to underestimate the population error variance. Second, positive serial correlation typically causes the ordinary least squares (OLS) standard errors for the regression coefficients to underestimate the true standard errors. As a consequence, if positive serial correlation is present in the regression, standard linear regression analysis will typically lead us to compute artificially small standard errors for the regression coefficient. These small standard errors will cause the estimated t-statistic to be inflated, suggesting significance where perhaps there is none. The inflated t-statistic, may in turn, lead us to incorrectly reject null hypotheses, about population values of the parameters of the regression model more often than we would if the standard errors were correctly estimated.

If the Durbin–Watson statistic indicates the presence of serial correlation of the residuals, this can be remedied by using the Cochrane–Orcutt procedure.

The Durbin–Watson statistic, while displayed by many regression analysis programs, is not applicable in certain situations. For instance, when lagged dependent variables are included in the explanatory variables, then it is inappropriate to use this test. Durbin's h-test (see below) or likelihood ratio tests, that are valid in large samples, should be used.

Durbin h-statistic

The Durbin–Watson statistic is biased for autoregressive moving average models, so that autocorrelation is underestimated. But for large samples one can easily compute the unbiased normally distributed h-statistic:

using the Durbin–Watson statistic d and the estimated variance

of the regression coefficient of the lagged dependent variable, provided

Implementations in statistics packages

  1. R: the dwtest function in the lmtest package, durbinWatsonTest (or dwt for short) function in the car package, and pdwtest and pbnftest for panel models in the plm package.[6]
  2. MATLAB: the dwtest function in the Statistics Toolbox.
  3. Mathematica: the Durbin–Watson (d) statistic is included as an option in the LinearModelFit function.
  4. SAS: Is a standard output when using proc model and is an option (dw) when using proc reg.
  5. EViews: Automatically calculated when using OLS regression
  6. gretl: Automatically calculated when using OLS regression
  7. Stata: the command estat dwatson, following regress in time series data.[7] Engle's LM test for autoregressive conditional heteroskedasticity (ARCH), a test for time-dependent volatility, the Breusch–Godfrey test, and Durbin's alternative test for serial correlation are also available. All (except -dwatson-) tests separately for higher-order serial correlations. The Breusch–Godfrey test and Durbin's alternative test also allow regressors that are not strictly exogenous.
  8. Excel: although Microsoft Excel 2007 does not have a specific Durbin–Watson function, the d-statistic may be calculated using =SUMXMY2(x_array,y_array)/SUMSQ(array)
  9. Minitab: the option to report the statistic in the Session window can be found under the "Options" box under Regression and via the "Results" box under General Regression.
  10. Python: a durbin_watson function is included in the statsmodels package (statsmodels.stats.stattools.durbin_watson), but statistical tables for critical values are not available there. The statistics and p-value calculation is implemented in dwtest function (https://github.com/dima-quant/dwtest).
  11. SPSS: Included as an option in the Regression function.
  12. Julia: the DurbinWatsonTest function is available in the HypothesisTests package.[8]

See also

Notes

  1. Chatterjee, Samprit; Simonoff, Jeffrey (2013). Handbook of Regression Analysis. John Wiley & Sons. ISBN 1118532813.
  2. "Serial correlation techniques". statisticalideas.blogspot.com. Retrieved 3 April 2018.
  3. Gujarati (2003) p. 469
  4. Durbin, J.; Watson, G. S. (1971). "Testing for serial correlation in least squares regression.III". Biometrika. 58 (1): 1–19. doi:10.2307/2334313.
  5. Farebrother, R. W. (1980). "Algorithm AS 153: Pan's procedure for the tail probabilities of the Durbin-Watson statistic". Journal of the Royal Statistical Society, Series C. 29 (2): 224–227.
  6. Hateka, Neeraj R. (2010). "Tests for Detecting Autocorrelation". Principles of Econometrics: An Introduction (Using R). SAGE Publications. pp. 379–82. ISBN 978-81-321-0660-9.
  7. "regress postestimation time series — Postestimation tools for regress with time series" (PDF). Stata Manual.
  8. "Time series tests". juliastats.org. Retrieved 2020-02-04.

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.