Chapter 12 – Autocorrelation for Time Variables When time is a variable considered in a linear regression model the error terms are often correlated which goes against the usual assumption that these error terms be uncorrelated, or independent. If correlation of error terms occurs then the use of ordinary least squares can result in a MSE that underestimates the variance of the error terms and the standard error of the estimated coefficients, and the confidence intervals we previously discussed in class are no longer applicable. A common statistic used to test for autocorrelation of error terms is the Durbin-Watson (D) test. These values can be obtained in Minitab under Options > Durbin-Watson. The statistic is printed in the Session (i.e. output) window. This value is then compared to values in a table (see Table B.7 on pages 1330 and 1331) which provides upper and lower bounds for several alpha, p – 1, and sample size values, where as usual p is the number of covariates plus intercept in the model. The general hypotheses are: [NOTE: this test is only applicable to models using first-order terms] Ho: p = 0 vs. Ha: p > 0 where p represents the autocorrelation parameter and Ha means that the error terms are positively correlated. The decision rules based on Table B.7 and using the D statistic are as follows: ∑𝑛𝑡(𝑒𝑡 − 𝑒𝑡−1 )2 𝐷= ∑ 𝑒𝑖2 If D > dU then conclude Ho --- the error terms are not correlated If D < dL then conclude Ha --- the error terms are positively correlated (NOTE: if test for negative autocorrelation the test statistic is 4 – D (where D is defined above)) and then apply decision rule accept if true then terms negatively correlated. If dL ≤ D ≤ dU then the test is inconclusive 1. In ANGEL open Data > Chapter 12 > Table 12.2 2. Regress Y on X store residuals and click Options and select Durbin-Watson. 3. Find in the output your D statistic and compare this to the values found in Table B.7 for alpha = 0.01, n = 20 and p – 1 = 1. Draw your conclusion. Compare you results to those found for the example starting on page 488. Remedial measures if autocorrelation present: The first step should be to research/include additional predictor variables that have been omitted. For this example a potential missed variable could have been the seasonal effect, i.e. the quarterly reports. If additional variable(s) are not helpful then one can consider transformations. The typical “fix” for a test that is inconclusive is to gather a larger sample, but time series data does not lend itself to an easy gathering of more data. One reasonable solution is to attempt the remedial measures mentioned above. If these remedial measures do not produce substantially different (no rule of thumb for interpreting substantial) results from ordinary least squares regression, then the assumption of uncorrelated error terms can be accepted. Otherwise, if the remedial measures produce substantially different results, then these results would be more appropriate to report.