Time series data y,=Bo+B Brit ◆2. Further issues Economics 20- Prof anderson
Economics 20 - Prof. Anderson 1 Time Series Data yt = b0 + b1 xt1 + . . .+ bk xtk + ut 2. Further Issues
Testing for Ar(1) Serial Correlation Want to be able to test for whether the errors are serially correlated or not e Want to test the null that p=0 in u,=pu, I + t=2., n, where u, is the model error term and e is iid o With strictly exogenous regressors, the test Is very straightforward - - simply regress the residuals on lagged residuals and use a t-test Economics 20- Prof anderson
Economics 20 - Prof. Anderson 2 Testing for AR(1) Serial Correlation Want to be able to test for whether the errors are serially correlated or not Want to test the null that r = 0 in ut = rut-1 + et , t =2,…, n, where ut is the model error term and et is iid With strictly exogenous regressors, the test is very straightforward – simply regress the residuals on lagged residuals and use a t-test
Testing for Ar(1) Serial Correlation(continued) o An alternative is the Durbin-Watson DW) statistic, which is calculated by many pacKages If the dw statistic is around 2. then we can reject serial correlation, while if it is significantly <2 we cannot reject Critical values are difficult to calculate making the t test easier to work with Economics 20- Prof anderson
Economics 20 - Prof. Anderson 3 Testing for AR(1) Serial Correlation (continued) An alternative is the Durbin-Watson (DW) statistic, which is calculated by many packages If the DW statistic is around 2, then we can reject serial correlation, while if it is significantly < 2 we cannot reject Critical values are difficult to calculate, making the t test easier to work with
Testing for Ar(1) Serial Correlation(continued) e If the regressors are not strictly exogenous, then neither the t or dw test will work e Regress the residual (or y)on the lagged residual and all of the x's The inclusion of the x' s allows each x to be correlated with u,), so dont need assumption of strict exogeneity Economics 20- Prof anderson 4
Economics 20 - Prof. Anderson 4 Testing for AR(1) Serial Correlation (continued) If the regressors are not strictly exogenous, then neither the t or DW test will work Regress the residual (or y) on the lagged residual and all of the x’s The inclusion of the x’s allows each xtj to be correlated with ut-1 , so don’t need assumption of strict exogeneity
Testing for Higher Order SC Q Can test for AR(q serial correlation in the same basic manner as AR(1) Just include g lags of the residuals in the regression and test for joint significance Can use f test or lm test where the lm version is called a Breusch-godfrey test and is(n-qR2 using R2 from residual regression Can also test for seasonal forms Economics 20- Prof anderson 5
Economics 20 - Prof. Anderson 5 Testing for Higher Order S.C. Can test for AR(q) serial correlation in the same basic manner as AR(1) Just include q lags of the residuals in the regression and test for joint significance Can use F test or LM test, where the LM version is called a Breusch-Godfrey test and is (n-q)R2 using R2 from residual regression Can also test for seasonal forms
Correcting for Serial Correlation o Start with case of strictly exogenous regressors, and maintain all G-M assumptions except no serial correlation 2 Assume errors follow AR(1)so u,=pu,.+ 2 ◆Var(u4)=a2(1-P3 We need to try and transform the equation so we have no serial correlation in the e errors Economics 20- Prof anderson 6
Economics 20 - Prof. Anderson 6 Correcting for Serial Correlation Start with case of strictly exogenous regressors, and maintain all G-M assumptions except no serial correlation Assume errors follow AR(1) so ut = rut-1 + et , t =2,…, n Var(ut ) = s 2 e /(1-r 2 ) We need to try and transform the equation so we have no serial correlation in the errors
Correcting for SC(continued) e Consider that since y,=Bo+Br,+u, then yt-I Bo+ Bx+ and subtract if from the first you get 3 o If you multiply the second equation by ◆y1-py1=(1-则B+B1x-px1D+e1 since et- pui-I ◆ This quasi-dife ferencing results in a model without serial correlation Economics 20- Prof anderson 7
Economics 20 - Prof. Anderson 7 Correcting for S.C. (continued) Consider that since yt = b0 + b1 xt + ut , then yt-1 = b0 + b1 xt-1 + ut-1 If you multiply the second equation by r, and subtract if from the first you get yt – r yt-1 = (1 – r)b0 + b1 (xt – r xt-1 ) + et , since et = ut – r ut-1 This quasi-differencing results in a model without serial correlation
Feasible gls estimation Problem with this method is that we don't know p, so we need to get an estimate first o Can just use the estimate obtained from regressing residuals on lagged residuals o Depending on how we deal with the first observation this is either called cochrane Orcutt or Prais-Winsten estimation Economics 20- Prof anderson 8
Economics 20 - Prof. Anderson 8 Feasible GLS Estimation Problem with this method is that we don’t know r, so we need to get an estimate first Can just use the estimate obtained from regressing residuals on lagged residuals Depending on how we deal with the first observation, this is either called CochraneOrcutt or Prais-Winsten estimation
Feasible GLs(continued) Often both Cochrane-Orcutt and Prais- Winsten are implemented iterative This basic method can be extended to allow for higher order serial correlation, AR(q e Most statistical packages will automatically allow for estimation of ar models without having to do the quasi-differencing by hand Economics 20- Prof anderson 9
Economics 20 - Prof. Anderson 9 Feasible GLS (continued) Often both Cochrane-Orcutt and PraisWinsten are implemented iteratively This basic method can be extended to allow for higher order serial correlation, AR(q) Most statistical packages will automatically allow for estimation of AR models without having to do the quasi-differencing by hand
Serial correlation -robust Standard errors o What happens if we don't think the regressors are all strictly exogenous o It's possible to calculate serial correlation- robust standard errors along the same lines as heteroskedasticity robust standard errors o Idea is that want to scale the ols standard errors to take into account serial correlation Economics 20- Prof anderson 10
Economics 20 - Prof. Anderson 10 Serial Correlation-Robust Standard Errors What happens if we don’t think the regressors are all strictly exogenous? It’s possible to calculate serial correlationrobust standard errors, along the same lines as heteroskedasticity robust standard errors Idea is that want to scale the OLS standard errors to take into account serial correlation