In statistics, the Durbin–Watson statistic is a test statistic used to detect the presence of autocorrelation (a relationship between values separated from each other by a given time lag) 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. Later, John Denis Sargan and Alok Bhargava developed several von Neumann–Durbin–Watson type test statistics for the null hypothesis that the errors on a regression model follow a process with a unit root against the alternative hypothesis that the errors follow a stationary first order autoregression (Sargan and Bhargava, 1983). Note that the distribution of this test statistic does not depend on the estimated regression coefficients and the variance of the errors.^{[1]}
Contents

Computing and interpreting the Durbin–Watson statistic 1

Durbin hstatistic 2

Durbin–Watson test for panel data 3

Implementations in statistics packages 4

See also 5

Notes 6

References 7

External links 8
Computing and interpreting the Durbin–Watson statistic
If e_{t} is the residual associated with the observation at time t, then the test statistic is

d = {\sum_{t=2}^T (e_t  e_{t1})^2 \over {\sum_{t=1}^T e_t^2}},
where T is the number of observations. Note that if one has a lengthy sample, then Statistical Ideas site shows this can be linearly mapped to the Pearson correlation of the timeseries data with its lags.^{[2]} Since d is approximately equal to 2(1 − r), where r 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, on average, close in value to one another, or positively correlated. If d > 2, successive error terms are, on average, much different in value from one another, i.e., 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 (d_{L,α} and d_{U,α}):


If d < d_{L,α}, there is statistical evidence that the error terms are positively autocorrelated.

If d > d_{U,α}, there is no statistical evidence that the error terms are positively autocorrelated.

If d_{L,α} < d < d_{U,α}, 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 (d_{L,α} and d_{U,α}):


If (4 − d) < d_{L,α}, there is statistical evidence that the error terms are negatively autocorrelated.

If (4 − d) > d_{U,α}, there is no statistical evidence that the error terms are negatively autocorrelated.

If d_{L,α} < (4 − d) < d_{U,α}, 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, d_{L,α} and d_{U,α}, vary by level of significance (α), the number of observations, and the number of predictors in the regression equation. Their derivation is complex—statisticians typically obtain them from the appendices of statistical texts.
If the design matrix \mathbf{X} of the regression is known, exact critical values for the distribution of d under the null hypothesis of no serial correlation can be calculated. Under the null hypothesis d is distributed as

\frac {\sum_{i=1}^{nk} \nu_i \xi_i^2} {\sum_{i=1}^{nk} \xi_i^2},
where n are the number of observations and k the number of regression variables; the \xi_i are independent standard normal random variables; and the \nu_i are the nonzero eigenvalues of ( \mathbf{I}  \mathbf{X} ( \mathbf{X}^T \mathbf{X} ) ^{1} \mathbf{X}^T ) \mathbf{A}, where \mathbf{A} is the matrix that transforms the residuals into the d statistic, i.e. d = \mathbf{e}^T\mathbf{A}\mathbf{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 Fstatistic 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 tstatistic to be inflated, suggesting significance where perhaps there is none. The inflated tstatistic, 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.
It is important to note that 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 htest (see below) or likelihood ratio tests, that are valid in large samples, should be used.
Durbin hstatistic
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 hstatistic:

h = \left( 1  \frac {1} {2} d \right) \sqrt{\frac {T} {1T \cdot \widehat {\operatorname{Var}}(\widehat\beta_1\,)}},
using the Durbin–Watson statistic d and the estimated variance

\widehat{Var} (\widehat\beta_1)
of the regression coefficient of the lagged dependent variable, provided

T \cdot \widehat{Var}(\widehat\beta_1)<1. \,
Durbin–Watson test for panel data
For panel data this statistic was generalized as follows by Alok Bhargava et al. (1982):

If e_{i, t} is the residual from an OLS regression with fixed effects for each panel i, associated with the observation in panel i at time t, then the test statistic is


d_{pd}=\frac{\sum_{i=1}^N \sum_{t=2}^T (e_{i,t}  e_{i,t1})^2} {\sum_{i=1}^N \sum_{t=1}^T e_{i,t}^2}.
This statistic can be compared with tabulated rejection values [see Alok Bhargava et al. (1982), page 537]. These values are calculated dependent on T (length of the balanced panel—time periods the individuals were surveyed), K (number of regressors) and N (number of individuals in the panel). This test statistic can also be used for testing the null hypothesis of a unit root against stationary alternatives in fixed effects models using another set of bounds (Tables V and VI) tabulated by Alok Bhargava et al. (1982).
Implementations in statistics packages

R: the dwtest function in the lmtest package, durbinWatsonTest (or dwt for short) function in the car package, and pdwtest for panel models in the plm package.^{[6]}

MATLAB: the dwtest function in the Statistics Toolbox.

Mathematica: the Durbin–Watson (d) statistic is included as an option in the LinearModelFit function.

SAS: Is a standard output when using proc model and is an option (dw) when using proc reg.

EViews: Automatically calculated when using ols regression

Stata: the command
. estat dwatson
, following . regress
in time series data.^{[7]} Engle's LM test for autoregressive conditional heteroskedasticity (ARCH), a test for timedependent volatility, the Breusch–Godfrey test, and Durbin's alternative test for serial correlation are also available. All (except dwatson) tests separately for higherorder serial correlations. The Breusch–Godfrey test and Durbin's alternative test also allow regressors that are not strictly exogenous.

Excel: although Microsoft Excel 2007 does not have a specific Durbin–Watson function, the dstatistic may be calculated using "=SUMXMY2(x_array,y_array)/SUMSQ(array)"

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.

Python: a durbin_watson function is included in the statsmodels package (statsmodels.stats.stattools.durbin_watson)

SPSS: Included as an option in the Regression function.
See also
Notes

^ Chatterjee, Samprit; Simonoff, Jeffrey (2013). Handbook of Regression Analysis. John Wiley & Sons.

^ http://statisticalideas.blogspot.com/2014/05/serialcorrelationtechniques.html

^ Gujarati (2003) p. 469

^ Durbin, J.; Watson, G. S. (1971). "Testing for serial correlation in least squares regression.III". Biometrika 58 (1): 1–19.

^ Farebrother, R. W. (1980). "Algorithm AS 153: Pan's procedure for the tail probabilities of the DurbinWatson statistic". Journal of the Royal Statistical Society, Series C 29 (2): 224–227.

^ Hateka, Neeraj R. (2010). "Tests for Detecting Autocorrelation". Principles of Econometrics: An Introduction (Using R). SAGE Publications. pp. 379–82.

^ "regress postestimation time series — Postestimation tools for regress with time series" (PDF). Stata Manual.
References

Bhargava, Alok; Franzini, L.; Narendranathan, W. (1982). "Serial Correlation and the Fixed Effects Model".

Durbin, J.; Watson, G. S. (1950). "Testing for Serial Correlation in Least Squares Regression, I".

Durbin, J.; Watson, G. S. (1951). "Testing for Serial Correlation in Least Squares Regression, II". Biometrika 38 (1–2): 159–179.

Gujarati, Damodar N.; Porter, Dawn C. (2009). Basic Econometrics (5th ed.). Boston: McGrawHill Irwin.


Neumann, John von (1941). "Distribution of the ratio of the mean square successive difference to the variance".


Verbeek, Marno (2012). A Guide to Modern Econometrics (4th ed.). Chichester: John Wiley & Sons. pp. 117–118.
External links

k and nTable for high

Econometrics lecture (topic: Durbin–Watson statistic) on YouTube by Mark Thoma
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.