Introduction to Econometrics, 5th edition Chapter 12: Autocorrelation Type author name/s here Dougherty Introduction to Econometrics, 5th edition Chapter heading Chapter 12: Autocorrelation © Christopher Dougherty, 2016. All rights reserved.
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: LGFOOD Method: Least Squares Sample: 1959 2003 Included observations: 45 Variable Coefficient Std. Error t-Statistic Prob. C 2.236158 0.388193 5.760428 0.0000 LGDPI 0.500184 0.008793 56.88557 0.0000 LGPRFOOD -0.074681 0.072864 -1.024941 0.3113 R-squared 0.992009 Mean dependent var 6.021331 Adjusted R-squared 0.991628 S.D. dependent var 0.222787 S.E. of regression 0.020384 Akaike info criter-4.883747 Sum squared resid 0.017452 Schwarz criterion -4.763303 Log likelihood 112.8843 Hannan-Quinn crite-4.838846 F-statistic 2606.860 Durbin-Watson stat 0.478540 Prob(F-statistic) 0.000000 The output shown in the table gives the result of a logarithmic regression of expenditure on food on disposable personal income and the relative price of food. 1
TESTS FOR AUTOCORRELATION III: EXAMPLES Residuals, static logarithmic regression for FOOD The plot of the residuals is shown. All the tests indicate highly significant autocorrelation. 2
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1960 2003 Included observations: 44 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. RLGFOOD(-1) 0.790169 0.106603 7.412228 0.0000 R-squared 0.560960 Mean dependent var 3.28E-05 Adjusted R-squared 0.560960 S.D. dependent var 0.020145 S.E. of regression 0.013348 Akaike info criter-5.772439 Sum squared resid 0.007661 Schwarz criterion -5.731889 Log likelihood 127.9936 Durbin-Watson stat 1.477337 RLGFOOD in the regression above is the residual from the LGFOOD regression. A simple regression of RLGFOOD on RLGFOOD(–1) yields a coefficient of 0.79 with standard error 0.11. 3
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1960 2003 Included observations: 44 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. RLGFOOD(-1) 0.790169 0.106603 7.412228 0.0000 R-squared 0.560960 Mean dependent var 3.28E-05 Adjusted R-squared 0.560960 S.D. dependent var 0.020145 S.E. of regression 0.013348 Akaike info criter-5.772439 Sum squared resid 0.007661 Schwarz criterion -5.731889 Log likelihood 127.9936 Durbin-Watson stat 1.477337 Technical note for EViews users: EViews places the residuals from the most recent regression in a pseudo-variable called resid. resid cannot be used directly. So the residuals were saved as RLGFOOD using the genr command: genr RLGFOOD = resid 4
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1960 2003 Included observations: 44 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.175732 0.265081 0.662936 0.5112 LGDPI -7.36E-05 0.006180 -0.011917 0.9906 LGPRFOOD -0.037373 0.049496 -0.755058 0.4546 RLGFOOD(-1) 0.805744 0.110202 7.311504 0.0000 R-squared 0.572006 Mean dependent var 3.28E-05 Adjusted R-squared 0.539907 S.D. dependent var 0.020145 S.E. of regression 0.013664 Akaike info criter-5.661558 Sum squared resid 0.007468 Schwarz criterion -5.499359 Log likelihood 128.5543 F-statistic 17.81977 Durbin-Watson stat 1.513911 Prob(F-statistic) 0.000000 Next, the Breusch‒Godfrey test. Adding an intercept, LGDPI and LGPRFOOD to the specification, the coefficient of the lagged residuals becomes 0.81 with standard error 0.11. R2 is 0.5720, so nR2 is 25.17. 5
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1960 2003 Included observations: 44 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.175732 0.265081 0.662936 0.5112 LGDPI -7.36E-05 0.006180 -0.011917 0.9906 LGPRFOOD -0.037373 0.049496 -0.755058 0.4546 RLGFOOD(-1) 0.805744 0.110202 7.311504 0.0000 R-squared 0.572006 Mean dependent var 3.28E-05 Adjusted R-squared 0.539907 S.D. dependent var 0.020145 S.E. of regression 0.013664 Akaike info criter-5.661558 Sum squared resid 0.007468 Schwarz criterion -5.499359 Log likelihood 128.5543 F-statistic 17.81977 Durbin-Watson stat 1.513911 Prob(F-statistic) 0.000000 (Note that here n = 44. There are 45 observations in the regression in Table 12.1, and one fewer in the residuals regression.) The critical value of chi-squared with one degree of freedom at the 0.1 percent level is 10.83. 6
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Breusch-Godfrey Serial Correlation LM Test: F-statistic 54.78773 Probability 0.000000 Obs*R-squared 25.73866 Probability 0.000000 Test Equation: Dependent Variable: RESID Method: Least Squares Presample missing value lagged residuals set to zero. Variable Coefficient Std. Error t-Statistic Prob. C 0.171665 0.258094 0.665124 0.5097 LGDPI 9.50E-05 0.005822 0.016324 0.9871 LGPRFOOD -0.036806 0.048504 -0.758819 0.4523 RESID(-1) 0.805773 0.108861 7.401873 0.0000 R-squared 0.571970 Mean dependent var-1.85E-18 Adjusted R-squared 0.540651 S.D. dependent var 0.019916 S.E. of regression 0.013498 Akaike info criter-5.687865 Sum squared resid 0.007470 Schwarz criterion -5.527273 Log likelihood 131.9770 F-statistic 18.26258 Durbin-Watson stat 1.514975 Prob(F-statistic) 0.000000 Technical note for EViews users: one can perform the test simply by following the LGFOOD regression with the command auto(1). EViews allows itself to use resid directly. 7
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Breusch-Godfrey Serial Correlation LM Test: F-statistic 54.78773 Probability 0.000000 Obs*R-squared 25.73866 Probability 0.000000 Test Equation: Dependent Variable: RESID Method: Least Squares Presample missing value lagged residuals set to zero. Variable Coefficient Std. Error t-Statistic Prob. C 0.171665 0.258094 0.665124 0.5097 LGDPI 9.50E-05 0.005822 0.016324 0.9871 LGPRFOOD -0.036806 0.048504 -0.758819 0.4523 RESID(-1) 0.805773 0.108861 7.401873 0.0000 R-squared 0.571970 Mean dependent var-1.85E-18 Adjusted R-squared 0.540651 S.D. dependent var 0.019916 S.E. of regression 0.013498 Akaike info criter-5.687865 Sum squared resid 0.007470 Schwarz criterion -5.527273 Log likelihood 131.9770 F-statistic 18.26258 Durbin-Watson stat 1.514975 Prob(F-statistic) 0.000000 The argument in the auto command relates to the order of autocorrelation being tested. At the moment we are concerned only with first-order autocorrelation. This is why the command is auto(1). 8
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Breusch-Godfrey Serial Correlation LM Test: F-statistic 54.78773 Probability 0.000000 Obs*R-squared 25.73866 Probability 0.000000 Test Equation: Dependent Variable: RESID Method: Least Squares Presample missing value lagged residuals set to zero. Variable Coefficient Std. Error t-Statistic Prob. C 0.171665 0.258094 0.665124 0.5097 LGDPI 9.50E-05 0.005822 0.016324 0.9871 LGPRFOOD -0.036806 0.048504 -0.758819 0.4523 RESID(-1) 0.805773 0.108861 7.401873 0.0000 R-squared 0.571970 Mean dependent var-1.85E-18 Adjusted R-squared 0.540651 S.D. dependent var 0.019916 S.E. of regression 0.013498 Akaike info criter-5.687865 Sum squared resid 0.007470 Schwarz criterion -5.527273 Log likelihood 131.9770 F-statistic 18.26258 Durbin-Watson stat 1.514975 Prob(F-statistic) 0.000000 When we performed the test, resid(–1), and hence RLGFOOD(–1), were not defined for the first observation in the sample, so we had 44 observations from 1960 to 2003. 9
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Breusch-Godfrey Serial Correlation LM Test: F-statistic 54.78773 Probability 0.000000 Obs*R-squared 25.73866 Probability 0.000000 Test Equation: Dependent Variable: RESID Method: Least Squares Presample missing value lagged residuals set to zero. Variable Coefficient Std. Error t-Statistic Prob. C 0.171665 0.258094 0.665124 0.5097 LGDPI 9.50E-05 0.005822 0.016324 0.9871 LGPRFOOD -0.036806 0.048504 -0.758819 0.4523 RESID(-1) 0.805773 0.108861 7.401873 0.0000 R-squared 0.571970 Mean dependent var-1.85E-18 Adjusted R-squared 0.540651 S.D. dependent var 0.019916 S.E. of regression 0.013498 Akaike info criter-5.687865 Sum squared resid 0.007470 Schwarz criterion -5.527273 Log likelihood 131.9770 F-statistic 18.26258 Durbin-Watson stat 1.514975 Prob(F-statistic) 0.000000 EViews uses the first observation by assigning a value of zero to the first observation for resid(–1). Hence the test results are very slightly different. 10
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1960 2003 Included observations: 44 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.175732 0.265081 0.662936 0.5112 LGDPI -7.36E-05 0.006180 -0.011917 0.9906 LGPRFOOD -0.037373 0.049496 -0.755058 0.4546 RLGFOOD(-1) 0.805744 0.110202 7.311504 0.0000 R-squared 0.572006 Mean dependent var 3.28E-05 Adjusted R-squared 0.539907 S.D. dependent var 0.020145 S.E. of regression 0.013664 Akaike info criter-5.661558 Sum squared resid 0.007468 Schwarz criterion -5.499359 Log likelihood 128.5543 F-statistic 17.81977 Durbin-Watson stat 1.513911 Prob(F-statistic) 0.000000 We can also perform the test with a t test on the coefficient of the lagged variable. 11
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Breusch-Godfrey Serial Correlation LM Test: F-statistic 54.78773 Probability 0.000000 Obs*R-squared 25.73866 Probability 0.000000 Test Equation: Dependent Variable: RESID Method: Least Squares Presample missing value lagged residuals set to zero. Variable Coefficient Std. Error t-Statistic Prob. C 0.171665 0.258094 0.665124 0.5097 LGDPI 9.50E-05 0.005822 0.016324 0.9871 LGPRFOOD -0.036806 0.048504 -0.758819 0.4523 RESID(-1) 0.805773 0.108861 7.401873 0.0000 R-squared 0.571970 Mean dependent var-1.85E-18 Adjusted R-squared 0.540651 S.D. dependent var 0.019916 S.E. of regression 0.013498 Akaike info criter-5.687865 Sum squared resid 0.007470 Schwarz criterion -5.527273 Log likelihood 131.9770 F-statistic 18.26258 Durbin-Watson stat 1.514975 Prob(F-statistic) 0.000000 Here is the corresponding output using the auto command built into EViews. The test is presented as an F statistic. Of course, when there is only one lagged residual, the F statistic is the square of the t statistic. 12
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: LGFOOD Method: Least Squares Sample: 1959 2003 Included observations: 45 Variable Coefficient Std. Error t-Statistic Prob. C 2.236158 0.388193 5.760428 0.0000 LGDPI 0.500184 0.008793 56.88557 0.0000 LGPRFOOD -0.074681 0.072864 -1.024941 0.3113 R-squared 0.992009 Mean dependent var 6.021331 Adjusted R-squared 0.991628 S.D. dependent var 0.222787 S.E. of regression 0.020384 Akaike info criter-4.883747 Sum squared resid 0.017452 Schwarz criterion -4.763303 Log likelihood 112.8843 Hannan-Quinn crite-4.838846 F-statistic 2606.860 Durbin-Watson stat 0.478540 Prob(F-statistic) 0.000000 dL = 1.24 (1% level, 2 explanatory variables, 45 observations) The Durbin–Watson statistic is 0.48. dL is 1.24 for a 1 percent significance test (2 explanatory variables, 45 observations). 13
TESTS FOR AUTOCORRELATION III: EXAMPLES Breusch–Godfrey test Test statistic: nR2, distributed as c2(q) Alternatively, F test on the lagged residuals H0: r1 = ... = rq = 0, H1: not H0 The Breusch–Godfrey test for higher-order autocorrelation is a straightforward extension of the first-order test. If we are testing for order q, we add q lagged residuals to the right side of the residuals regression. We will perform the test for second-order autocorrelation. 14
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1961 2003 Included observations: 43 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.071220 0.277253 0.256879 0.7987 LGDPI 0.000251 0.006491 0.038704 0.9693 LGPRFOOD -0.015572 0.051617 -0.301695 0.7645 RLGFOOD(-1) 1.009693 0.163240 6.185318 0.0000 RLGFOOD(-2) -0.289159 0.171960 -1.681548 0.1009 R-squared 0.602010 Mean dependent var 0.000149 Adjusted R-squared 0.560117 S.D. dependent var 0.020368 S.E. of regression 0.013509 Akaike info criter-5.661981 Sum squared resid 0.006935 Schwarz criterion -5.457191 Log likelihood 126.7326 F-statistic 14.36996 Durbin-Watson stat 1.892212 Prob(F-statistic) 0.000000 Here is the regression for RLGFOOD with two lagged residuals. The Breusch–Godfrey test statistic is 25.89. With two lagged residuals, the statistic has a chi-squared distribution with two degrees of freedom under the null hypothesis. It is significant at the 0.1 percent level 15
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1961 2003 Included observations: 43 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.071220 0.277253 0.256879 0.7987 LGDPI 0.000251 0.006491 0.038704 0.9693 LGPRFOOD -0.015572 0.051617 -0.301695 0.7645 RLGFOOD(-1) 1.009693 0.163240 6.185318 0.0000 RLGFOOD(-2) -0.289159 0.171960 -1.681548 0.1009 R-squared 0.602010 Mean dependent var 0.000149 Adjusted R-squared 0.560117 S.D. dependent var 0.020368 S.E. of regression 0.013509 Akaike info criter-5.661981 Sum squared resid 0.006935 Schwarz criterion -5.457191 Log likelihood 126.7326 F-statistic 14.36996 Durbin-Watson stat 1.892212 Prob(F-statistic) 0.000000 We will also perform an F test, comparing the RSS with the RSS for the same regression without the lagged residuals. We know the result, because one of the t statistics is very high. 16
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample: 1961 2003 Included observations: 43 Variable Coefficient Std. Error t-Statistic Prob. C 0.027475 0.412043 0.066680 0.9472 LGDPI -0.001074 0.009986 -0.107528 0.9149 LGPRFOOD -0.003948 0.076191 -0.051816 0.9589 R-squared 0.000298 Mean dependent var 0.000149 Adjusted R-squared -0.049687 S.D. dependent var 0.020368 S.E. of regression 0.020868 Akaike info criter-4.833974 Sum squared resid 0.017419 Schwarz criterion -4.711100 Log likelihood 106.9304 F-statistic 0.005965 Durbin-Watson stat 0.476550 Prob(F-statistic) 0.994053 Here is the regression for ELGFOOD without the lagged residuals. Note that the sample period has been adjusted to 1961 to 2003, to make RSS comparable with that for the previous regression. 17
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample: 1961 2003 Included observations: 43 Variable Coefficient Std. Error t-Statistic Prob. C 0.027475 0.412043 0.066680 0.9472 LGDPI -0.001074 0.009986 -0.107528 0.9149 LGPRFOOD -0.003948 0.076191 -0.051816 0.9589 R-squared 0.000298 Mean dependent var 0.000149 Adjusted R-squared -0.049687 S.D. dependent var 0.020368 S.E. of regression 0.020868 Akaike info criter-4.833974 Sum squared resid 0.017419 Schwarz criterion -4.711100 Log likelihood 106.9304 F-statistic 0.005965 Durbin-Watson stat 0.476550 Prob(F-statistic) 0.994053 The F statistic is 28.72. This is significant at the 1% level. The critical value for F(2,35) is 8.47. That for F(2,38) must be slightly lower. 18
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Breusch-Godfrey Serial Correlation LM Test: F-statistic 30.24142 Probability 0.000000 Obs*R-squared 27.08649 Probability 0.000001 Test Equation: Dependent Variable: RESID Method: Least Squares Presample missing value lagged residuals set to zero. Variable Coefficient Std. Error t-Statistic Prob. C 0.053628 0.261016 0.205460 0.8383 LGDPI 0.000920 0.005705 0.161312 0.8727 LGPRFOOD -0.013011 0.049304 -0.263900 0.7932 RESID(-1) 1.011261 0.159144 6.354360 0.0000 RESID(-2) -0.290831 0.167642 -1.734833 0.0905 R-squared 0.601922 Mean dependent var-1.85E-18 Adjusted R-squared 0.562114 S.D. dependent var 0.019916 S.E. of regression 0.013179 Akaike info criter-5.715965 Sum squared resid 0.006947 Schwarz criterion -5.515225 Log likelihood 133.6092 F-statistic 15.12071 Durbin-Watson stat 1.894290 Prob(F-statistic) 0.000000 Here is the output using the auto(2) command in EViews. The conclusions for the two tests are the same. 19
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: LGFOOD Method: Least Squares Sample (adjusted): 1960 2003 Included observations: 44 after adjustments Variable Coefficient Std. Error t-Statistic Prob. C 0.985780 0.336094 2.933054 0.0055 LGDPI 0.126657 0.056496 2.241872 0.0306 LGPRFOOD -0.088073 0.051897 -1.697061 0.0975 LGFOOD(-1) 0.732923 0.110178 6.652153 0.0000 R-squared 0.995879 Mean dependent var 6.030691 Adjusted R-squared 0.995570 S.D. dependent var 0.216227 S.E. of regression 0.014392 Akaike info criter-5.557847 Sum squared resid 0.008285 Schwarz criterion -5.395648 Log likelihood 126.2726 Hannan-Quinn crite-5.497696 F-statistic 3222.264 Durbin-Watson stat 1.112437 Prob(F-statistic) 0.000000 The output above gives the result of a parallel logarithmic regression with the addition of lagged expenditure on food as an explanatory variable. Again, there is strong evidence that the specification is subject to autocorrelation. 20
TESTS FOR AUTOCORRELATION III: EXAMPLES Residuals, ADL(1,0) logarithmic regression for FOOD Here is a plot of the residuals. 21
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1961 2003 Included observations: 43 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. RLGFOOD(-1) 0.431010 0.143277 3.008226 0.0044 R-squared 0.176937 Mean dependent var 0.000276 Adjusted R-squared 0.176937 S.D. dependent var 0.013922 S.E. of regression 0.012630 Akaike info criter-5.882426 Sum squared resid 0.006700 Schwarz criterion -5.841468 Log likelihood 127.4722 Durbin-Watson stat 1.801390 A simple regression of the residuals on the lagged residuals yields a coefficient of 0.43 with standard error 0.14. We expect the estimate to be adversely affected by the presence of the lagged dependent variable in the regression for LGFOOD. 22
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1961 2003 Included observations: 43 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.417342 0.317973 1.312507 0.1972 LGDPI 0.108353 0.059784 1.812418 0.0778 LGPRFOOD -0.005585 0.046434 -0.120279 0.9049 LGFOOD(-1) -0.214252 0.116145 -1.844700 0.0729 RLGFOOD(-1) 0.604346 0.172040 3.512826 0.0012 R-squared 0.246863 Mean dependent var 0.000276 Adjusted R-squared 0.167586 S.D. dependent var 0.013922 S.E. of regression 0.012702 Akaike info criter-5.785165 Sum squared resid 0.006131 Schwarz criterion -5.580375 Log likelihood 129.3811 F-statistic 3.113911 Durbin-Watson stat 1.867467 Prob(F-statistic) 0.026046 With an intercept, LGDPI, LGPRFOOD, and LGFOOD(–1) added to the specification, the coefficient of the lagged residuals becomes 0.60 with standard error 0.17. 23
TESTS FOR AUTOCORRELATION III: EXAMPLES ============================================================ Dependent Variable: RLGFOOD Method: Least Squares Sample(adjusted): 1961 2003 Included observations: 43 after adjusting endpoints Variable Coefficient Std. Error t-Statistic Prob. C 0.417342 0.317973 1.312507 0.1972 LGDPI 0.108353 0.059784 1.812418 0.0778 LGPRFOOD -0.005585 0.046434 -0.120279 0.9049 LGFOOD(-1) -0.214252 0.116145 -1.844700 0.0729 RLGFOOD(-1) 0.604346 0.172040 3.512826 0.0012 R-squared 0.246863 Mean dependent var 0.000276 Adjusted R-squared 0.167586 S.D. dependent var 0.013922 S.E. of regression 0.012702 Akaike info criter-5.785165 Sum squared resid 0.006131 Schwarz criterion -5.580375 Log likelihood 129.3811 F-statistic 3.113911 Durbin-Watson stat 1.867467 Prob(F-statistic) 0.026046 R2 is 0.2469, so nR2 is 10.62, significant at the 1 percent level and nearly significant at the 0.1 percent level. (Note that here n = 43.) The t statistic for the coefficient of the lagged residual is also highly significant. 23
Copyright Christopher Dougherty 2016. These slideshows may be downloaded by anyone, anywhere for personal use. Subject to respect for copyright and, where appropriate, attribution, they may be used as a resource for teaching an econometrics course. There is no need to refer to the author. The content of this slideshow comes from Section 12.2 of C. Dougherty, Introduction to Econometrics, fifth edition 2016, Oxford University Press. Additional (free) resources for both students and instructors may be downloaded from the OUP Online Resource Centre http://www.oxfordtextbooks.co.uk/orc/dougherty5e/. Individuals studying econometrics on their own who feel that they might benefit from participation in a formal course should consider the London School of Economics summer school course EC212 Introduction to Econometrics http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx or the University of London International Programmes distance learning course 20 Elements of Econometrics www.londoninternational.ac.uk/lse. 2016.05.22