EZ Study

Actuarial Biology Chemistry Economics Calculators Confucius Engineer
Physics
C.S.

What is Durbin-Watson Statistics? Why?

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.


The value of d always lies between 0 and 4.
Pearson =0 <===> d = 2 indicates no autocorrelation.
Pearson =-1 <===> d = 4 indicates negative correlation.
Pearson =1 <===> d = 0 indicates positive correlation.

As a rough rule of thumb, if Durbin-Watson is less than 1.0, there may be cause for alarm.

Example 1: Computing Durbin-Watson Statistic for a variable.

proc reg data = sp500;
  model open = /dw;
run;
quit;

Dependent Variable: open
                             Analysis of Variance
                                    Sum of           Mean
Source                   DF        Squares         Square    F Value    Pr > F
Model                     0              0              .        .       .
Error                   247        1875052     7591.30215
Corrected Total         247        1875052
Root MSE             87.12808    R-Square     0.0000
Dependent Mean     1194.88379    Adj R-Sq     0.0000
Coeff Var             7.29176
                        Parameter Estimates
                     Parameter       Standard
Variable     DF       Estimate          Error    t Value    Pr > |t|
Intercept     1     1194.88379        5.53264     215.97      <.0001

Durbin-Watson D                0.034
Number of Observations           248
1st Order Autocorrelation      0.979

The value of Durbin-Watson statistic is close to 2 if the errors are uncorrelated. In our example, it is .034. That means that there is a strong evidence that the variable open has high autocorrelation.

Example 2: Output 1st-order autocorrelation of multiple variables into a data set

Let's say that we want to compute the 1st-order autocorrelation for all the variables of interest. We can make use of the ODS facility to output the 1st-order autocorrelation for each variable to a data set called auto_corr.

proc reg data = sp500;
  model open high low close volume = /dw;
 ods output dwstatistic = auto_corr 
	(where=(label1="1st Order Autocorrelation")) ;
run;
quit;

proc print data = auto_corr noobs;
  var dependent label1 cvalue1;
run;
                                            c
Dependent             Label1              Value1
 open        1st Order Autocorrelation    0.979
 high        1st Order Autocorrelation    0.984
 low         1st Order Autocorrelation    0.983
 close       1st Order Autocorrelation    0.981
 volume      1st Order Autocorrelation    0.545
A good resource of regression Diagnostics tutorial at: UCLA regression Diagnostics.

Continue to Mahalanobis distance for outlier detection -2       Statistics Tutorial Home
Back to 8. Why We need Reverse Sampling Weight?       SAS Tutorial Home