Testing for AutocorrelationThe following options on the
ExamplesAppendix[SHAZAM Guide home] Using the DurbinWatson testThe DurbinWatson test statistic is designed for detecting errors that follow a firstorder autoregressive process. This statistic also fills an important role as a general test of model misspecification. See, for example, the discussion in Gujarati [1995, pp. 462464]. The pvalue = P(d < DW) The computation of a pvalue is useful if the DurbinWatson test statistic falls in the inconclusive range given in statistical tables. If the pvalue is less than a selected level of significance (say 0.05) then there is evidence to reject the null hypothesis. If the alternative hypothesis of interest is negative autocorrelation then the pvalue is: pvalue = P(d > DW) = 1 Following the
ExampleThis example uses the Theil textile data set.
The SHAZAM commands
(filename:
The SHAZAM output can be inspected. The first OLS regression reports the results:
The estimation uses 17 observations and there are 2 estimated coefficients (including the intercept parameter). If we ignore the pvalue and rely on tables printed at the end of textbooks we find that the lower and upper critical values are 1.133 and 1.381 (for a 5% significance level) and 0.874 and 1.102 (for a 1% significance level). When compared with the reported DurbinWatson statistic the finding is that at a 5% level there is evidence for positive autocorrelation but at the 1% level the null hypothesis of no autocorrelation is not rejected. The computed pvalue verifies this conclusion. When the variable
By inspecting the pvalue, the conclusion is that when both
The regression equation that omitted
SHAZAM output with DurbinWatson test statistics_SAMPLE 1 17 _READ (THEIL.txt) YEAR CONSUME INCOME PRICE UNIT 88 IS NOW ASSIGNED TO: THEIL.txt 4 VARIABLES AND 17 OBSERVATIONS STARTING AT OBS 1 _OLS CONSUME PRICE / RSTAT DWPVALUE OLS ESTIMATION 17 OBSERVATIONS DEPENDENT VARIABLE = CONSUME ...NOTE..SAMPLE RANGE SET TO: 1, 17 DURBINWATSON STATISTIC = 1.19071 DURBINWATSON POSITIVE AUTOCORRELATION TEST PVALUE = 0.018346 NEGATIVE AUTOCORRELATION TEST PVALUE = 0.981655 RSQUARE = 0.8961 RSQUARE ADJUSTED = 0.8892 VARIANCE OF THE ESTIMATESIGMA**2 = 61.594 STANDARD ERROR OF THE ESTIMATESIGMA = 7.8482 SUM OF SQUARED ERRORSSSE= 923.91 MEAN OF DEPENDENT VARIABLE = 134.51 LOG OF THE LIKELIHOOD FUNCTION = 58.0829 VARIABLE ESTIMATED STANDARD TRATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 15 DF PVALUE CORR. COEFFICIENT AT MEANS PRICE 1.3233 0.1163 11.38 0.0000.947 0.9466 0.7508 CONSTANT 235.49 9.079 25.94 0.000 0.989 0.0000 1.7508 DURBINWATSON = 1.1907 VON NEUMANN RATIO = 1.2651 RHO = 0.38554 RESIDUAL SUM = 0.00000 RESIDUAL VARIANCE = 61.594 SUM OF ABSOLUTE ERRORS= 102.14 RSQUARE BETWEEN OBSERVED AND PREDICTED = 0.8961 RUNS TEST: 6 RUNS, 9 POS, 0 ZERO, 8 NEG NORMAL STATISTIC = 1.7451 _* Now include the variable INCOME in the regression equation _OLS CONSUME INCOME PRICE / RSTAT DWPVALUE OLS ESTIMATION 17 OBSERVATIONS DEPENDENT VARIABLE = CONSUME ...NOTE..SAMPLE RANGE SET TO: 1, 17 DURBINWATSON STATISTIC = 2.01855 DURBINWATSON POSITIVE AUTOCORRELATION TEST PVALUE = 0.301270 NEGATIVE AUTOCORRELATION TEST PVALUE = 0.698730 RSQUARE = 0.9513 RSQUARE ADJUSTED = 0.9443 VARIANCE OF THE ESTIMATESIGMA**2 = 30.951 STANDARD ERROR OF THE ESTIMATESIGMA = 5.5634 SUM OF SQUARED ERRORSSSE= 433.31 MEAN OF DEPENDENT VARIABLE = 134.51 LOG OF THE LIKELIHOOD FUNCTION = 51.6471 VARIABLE ESTIMATED STANDARD TRATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 14 DF PVALUE CORR. COEFFICIENT AT MEANS INCOME 1.0617 0.2667 3.981 0.001 0.729 0.2387 0.8129 PRICE 1.3830 0.8381E01 16.50 0.0000.975 0.9893 0.7846 CONSTANT 130.71 27.09 4.824 0.000 0.790 0.0000 0.9718 DURBINWATSON = 2.0185 VON NEUMANN RATIO = 2.1447 RHO = 0.18239 RESIDUAL SUM = 0.53291E14 RESIDUAL VARIANCE = 30.951 SUM OF ABSOLUTE ERRORS= 72.787 RSQUARE BETWEEN OBSERVED AND PREDICTED = 0.9513 RUNS TEST: 7 RUNS, 9 POS, 0 ZERO, 8 NEG NORMAL STATISTIC = 1.2423 _* Compute a pvalue for testing for negative autocorrelation _GEN1 PVAL=1$CDF ..NOTE..CURRENT VALUE OF $CDF = 0.30127 _PRINT PVAL PVAL 0.6987301 _STOP
