Chapter 11 Autocorrelation.

Similar presentations

2 Learning ObjectivesUnderstand the autoregressive structure of the error termUnderstand methods for detecting autocorrelationUnderstand how to correct for autocorrelationUnderstand unit roots and cointegration

3 What is Autocorrelation?Autocorrelation occurs when the error term in one period is related to the error term in previous periods. 𝜀 𝑡 =𝜌 𝜀 𝑡−1 + 𝑢 𝑡 where | 𝜌|<1 Positive Autocorrelation is when 𝜌 > 0 or when positive errors tend to follow positive errors and negative errors tend to follow negative errors. Negative Autocorrelation is when 𝜌 < 0 or when positive errors tend to follow negative errors and negative errors tend to follow positive errors.

7 The Issues And Consequences Associated With AutocorrelationProblem:Autocorrelation violates time-series assumption T6, which states that the error terms must not be correlated across time-periods.Consequences:Under autocorrelation parameter estimates are unbiased.Parameter estimates are not minimum variance among all unbiased estimators.Estimated standard errors are incorrect and all measures of precision based on the estimated standard errors are also incorrect.

9 An Important Caveat before ContinuingWith more advanced statistical packages, many researchers include a very simple command asking their chosen statistical program to provides standard error estimates that automatically correct for autocorrelation (Newey-West standard errors)Even though correcting for autocorrelation is straightforward, it important to first work through the more “old-school” examples that we do below before learning how to calculate Newey-West standard errors.

10 Understand the Autoregressive Structure Of the Error TermAR(1) – The error term this period is related to the error term last period 𝜀 𝑡 =𝜌 𝜀 𝑡−1 + 𝑢 𝑡 where | 𝜌|<1 AR(2) – The error term this period is related to the error term the last two periods 𝜀 𝑡 = 𝜌 1 𝜀 𝑡−1 + 𝜌 2 𝜀 𝑡−2 + 𝑢 𝑡 where | 𝜌|<1

11 Understand the Autoregressive Structure Of the Error TermAR(1,4) – The error term this period is related to the error term last period and the error term four periods ago 𝜀 𝑡 = 𝜌 1 𝜀 𝑡−1 + 𝜌 4 𝜀 𝑡−4 + 𝑢 𝑡 where | 𝜌 𝑖 |<1 AR(4) – The error term this period is related to the error term the last four periods 𝜀 𝑡 = 𝜌 1 𝜀 𝑡−1 + 𝜌 2 𝜀 𝑡−2 +𝜌 3 𝜀 𝑡−3 + 𝜌 4 𝜀 𝑡−4 + 𝑢 𝑡 where | 𝜌 𝑖 |<1

13 Informal Method Either graph:The residuals against each independent variable…The residuals squared over timeThe residuals against lagged residuals and look for a pattern in the observations. If a pattern exists then that is evidence of autocorrelation.

14 Regression of Export Volume in England on Exchange Rate from 1930 to 2009

16 This residual plot is obtained by checking the residual plot option in Excel when running a regression.As in the previous slide, notice how there is a pattern between the residuals and the independent variable.

17 The primary drawback of the informal method is that it is not clear how much of a pattern needs to exist to lead us to the conclusion that the model suffers from autocorrelation. This leads us to the need for formal tests of autocorrelation.

18 Formal Methods for Detecting AutocorrelationThe formal methods that we consider are all based on statistical tests of the following general null and alternative hypotheses 𝐻 0 : the error terms are not correlated over time 𝐻 1 : the error terms are correlated over time

21 Durbin-Watson Test for AR(1)Why It Works:Under perfect positive autocorrelation, this period’s error always equals last period’s period error, meaning that 𝑑=0. Under perfect negative autocorrelation, this period’s error is always exactly opposite last period’s error, meaning that 𝑑=4. Accordingly, calculated values of the test statistic that are closer to 0 or closer to 4 indicate that autocorrelation is present in the data.

22 Durbin-Watson Test for AR(1)Potential Issues:(1) The test cannot be performed in models with lagged dependent variables.(2) The test can only be performed on models in which the suspected autocorrelation takes the form of AR(1).(3) The errors must be normally distributed.(4) The model must include an intercept.(5) There is an inconclusive region.

26 Regression Test for AR(1)Why It Works:Autocorrelation of the form AR(1) exists if the current period errors are correlated with immediate prior period errors. Hence, if a regression of the current period residuals on the residuals lagged one period yields a statistically significant coefficient, we would conclude that the errors are correlated and that an AR(1) process does exist.

27 Regression Test for AR(1) for Trade Volume Data Dependent Variable is ResidualsThe individual significant of the lagged residuals is much less than 0.05 (or 0.01 for that matter) so we reject the null hypothesis of no AR(1) and conclude the model suffers from first order autocorrelation.

28 order autocorrelation.Regression Test for AR(2) for Trade Volume Data Dependent Variable is ResidualsThe significance F of the joint significance of the lagged residuals is much less than 0.05 (or 0.01 for that matter) so we reject the null hypothesis of no AR(2) and conclude the model suffers from secondorder autocorrelation.

32 Cochran-Orcutt Correction for AR(1) ProcessWhy It Works: In AR(1) processes, the current period error is related to the immediate prior period error according the equation. This method accounts for the correlation by using the observed data to estimate the value of 𝜌 and using that estimate to convert the data into a form that corrects for the correlation. 𝜀 𝑡 = 𝜀 𝑡 −𝜌 𝜀 𝑡−1 = 𝑢 𝑡

33 Cochran-Orcutt Correction in STATAHow to do it: First declare the data to be time series data using the command tsset time Then use the command prais y x1 x2 , corc

38 Newey-West Standard ErrorsThe preferred method to correct for autocorrelation is to use Newey-West autocorrelation and heteroskedastic consistent standard errors. The coefficient estimates are still unbiased so the only thing that needs to be corrected are the standard errors. In STATA, the command is newey y x1 x2 x3

40 What is a Unit Root?Unit Root occurs when the parameter on the AR(1) process is equal to 1 or 𝜌 = 1. 𝜀 𝑡 =𝜌 𝜀 𝑡−1 + 𝑢 𝑡 where 𝜌 = 1 Explosive Time Series is when a random shock has an increasingly larger influence. Dickey-Fuller Test is the test that is used to test for a unit root.

41 Using the Dickey-Fuller Test to test for a Unit Root𝐻 0 : 𝜌=1𝐻 𝐴 : 𝜌<1Use the command in STATAdfgls yIf the test statistic is less than the critical value then fail to reject the null hypothesis and conclude there is a unit root.

42 STATA Results of Dickey-Fuller Test on Export VolumeBecause the test statistic is less than the critical value, we fail to reject the null hypothesis and conclude these data suffer from a unit root.

43 What to Do if the Data Suffer from a Unit Root?(1) First difference the data 𝑦𝑑𝑖𝑓𝑓= 𝑦 𝑡 − 𝑦 𝑡−1 and test if the first differencing eliminated the unit root. (2) Find a variable that is cointegrated with 𝑦 𝑡 Cointegration occurs when two variables each has a unit root but both variables move together such that a linear combination of the two variables does not have a unit root.