Download presentation

Published byLilly Marter Modified over 3 years ago

1
ECON 4551 Econometrics II Memorial University of Newfoundland Time-series with stationary variables. Dynamic Models, Autocorrelation and Forecasting Chapter 9 Adapted from Vera Tabakova’s notes

2
**Chapter 9: Dynamic Models, Autocorrelation and Forecasting**

9.1 Introduction 9.2 Lags in the Error Term: Autocorrelation 9.3 Estimating an AR(1) Error Model 9.4 Testing for Autocorrelation 9.5 An Introduction to Forecasting: Autoregressive Models 9.6 Finite Distributed Lags 9.7 Autoregressive Distributed Lag Models Principles of Econometrics, 3rd Edition

3
9.1 Introduction Figure 9.1 Principles of Econometrics, 3rd Edition

4
**The model so far assumes that the observations are not correlated with one another.**

This is believable if one has drawn a random sample, but less likely if one has drawn observations sequentially in time Time series observations, which are drawn at regular intervals, usually embody a structure where time is an important component. Principles of Econometrics, 3rd Edition

5
If we cannot completely model this structure in the regression function itself, then the remainder spills over into the unobserved component of the statistical model (its error) and this causes the errors be correlated with one another. Principles of Econometrics, 3rd Edition

6
**Or lagged effects of explanatory variables **

In general, there are many situations where inertia affects a time series Or lagged effects of explanatory variables Or autocorrelation is introduced by “massaging” of the original data (interpolation, smoothing when going from monthly to quarterly, etc.) Or nonstationarity Principles of Econometrics, 3rd Edition

7
**Wrong functional form or missing variables**

But, as with heteroskedasticity, we should suspect first that there is a specification issue Wrong functional form or missing variables Principles of Econometrics, 3rd Edition

8
**9.1 Introduction (9.1) (9.2) (9.3) Three ways to view the dynamics:**

Principles of Econometrics, 3rd Edition

9
**Figure 9.2(a) Time Series of a Stationary Variable**

9.1 Introduction Figure 9.2(a) Time Series of a Stationary Variable Assume Stationarity For now Principles of Econometrics, 3rd Edition

10
9.1 Introduction Figure 9.2(b) Time Series of a Nonstationary Variable that is ‘Slow Turning’ or ‘Wandering’ Principles of Econometrics, 3rd Edition

11
**Figure 9.2(c) Time Series of a Nonstationary Variable that ‘Trends’**

9.1 Introduction Figure 9.2(c) Time Series of a Nonstationary Variable that ‘Trends’ Principles of Econometrics, 3rd Edition

12
**9.2 Lags in the Error Term: Autocorrelation**

9.2.1 Area Response Model for Sugar Cane (bangla.gdt) (9.4) (9.5) (9.6) Principles of Econometrics, 3rd Edition

13
**9.2.2 First-Order Autoregressive Errors**

(9.7) (9.8) But assume v well behaved: (9.9) (9.10) Assume also (the series is stationary Principles of Econometrics, 3rd Edition

14
**9.2.2 First-Order Autoregressive Errors**

(9.11) OK (9.12) OK, constant (9.13) Not zero!!! …but since we stick to stationary series, still constant Principles of Econometrics, 3rd Edition

15
**9.2.2 First-Order Autoregressive Errors**

(9.14) Focus on k=1 (9.15) aka autocorrelation coefficient (9.16) Running simple OLS On sugarcane example Principles of Econometrics, 3rd Edition

16
**9.2.2 First-Order Autoregressive Errors**

Principles of Econometrics, 3rd Edition

17
**9.2.2 First-Order Autoregressive Errors**

Figure Least Squares Residuals Plotted Against Time We see “runs” What if we saw “bouncing”? Principles of Econometrics, 3rd Edition

18
**9.2.2 First-Order Autoregressive Errors**

(9.17) General covariance formula: Constant variance Null expectation of x and y if they are errors (9.18) Principles of Econometrics, 3rd Edition

19
**9.3 Estimating an AR(1) Error Model**

The existence of AR(1) errors implies: The least squares estimator is still a linear and unbiased estimator, but it is no longer best. There is another estimator with a smaller variance. The standard errors usually computed for the least squares estimator are incorrect. Confidence intervals and hypothesis tests that use these standard errors may be misleading. Principles of Econometrics, 3rd Edition

20
**9.3 Estimating an AR(1) Error Model**

As with heteroskedastic errors, you can salvage OLS when your data are autocorrelated. Now you can use an estimator of standard errors that is robust to both heteroskedasticity and autocorrelation proposed by Newey and West. This estimator is sometimes called HAC, which stands for heteroskedasticity autocorrelated consistent. Principles of Econometrics, 3rd Edition

21
**9.3 Estimating an AR(1) Error Model**

HAC is not as automatic as the heteroskedasticity consistent (HC) estimator. With autocorrelation you have to specify how far away in time the autocorrelation is likely to be significant The autocorrelated errors over the chosen time window are averaged in the computation of the HAC standard errors; you have to specify how many periods over which to average and how much weight to assign each residual in that average. That weighted average is called a kernel and the number of errors to average is called bandwidth. Principles of Econometrics, 3rd Editio

22
**9.3 Estimating an AR(1) Error Model**

Usually, you choose a method of averaging (Bartlett kernel or Parzen kernel) and a bandwidth (nw1, nw2 or some integer). Often your software (example GRETL) defaults to the Bartlett kernel and a bandwidth computed based on the sample size, N. Trade-off: Larger bandwidths reduce bias (good) as well as precision (bad). Smaller bandwidths exclude more relevant autocorrelations (and hence have more bias) but use more observations to increase precision (smaller variance). Choose a bandwidth large enough to contain the largest autocorrelations. The choice will ultimately depend on the frequency of observation and the length of time it takes for your system to adjust to shocks. Principles of Econometrics, 3rd Edition

23
**9.3 Estimating an AR(1) Error Model**

Once GRETL recognizes that your data are a time series, then the robust command will automatically apply the HAC estimator of standard errors with the default values of the kernel and Bandwidth (or with your customized choices) Again, remember that there are several choices about how to run these corrections (so different software packages can yield slightly different results) In a way, this correction is just an extension of White’s correction for heteroskedasticity It is based on a formula that has the OLS formula as a special case Principles of Econometrics, 3rd Edition

24
**9.3 Estimating an AR(1) Error Model**

Sugar cane example The two sets of standard errors, along with the estimated equation are: The 95% confidence intervals for β2 are: Principles of Econometrics, 3rd Edition

25
**9.3.2 Nonlinear Least Squares Estimation**

However, as in the case of robust estimation under heteroskedasticity, the HAC correction corrects or accounts for autocorrelation but does not exploit it We can get a more precise estimator if we exploit the Idea that some observations are different not because of the effect of the regressor values, but because of the effect of the adjacent errors Principles of Econometrics, 3rd Edition

26
**9.3.2 Nonlinear Least Squares Estimation**

(9.19) (9.20) (9.21) (9.22) Principles of Econometrics, 3rd Edition

27
**9.3.2 Nonlinear Least Squares Estimation**

(9.23) (9.24) (9.25) Now this transformed nonlinear model has errors that are uncorrelated over time Principles of Econometrics, 3rd Edition

28
**9.3.2a Generalized Least Squares Estimation**

Solving this nonlinear regression is still based on minimizing the sum least squares, but it cannot be done with close formulae now (because of the nonlinearity in the parameters) so we call it Generalised Least Squares again It can be shown that nonlinear least squares estimation of (9.24) is equivalent to using an iterative generalized least squares estimator called the Cochrane-Orcutt procedure. Details are provided in Appendix 9A. Principles of Econometrics, 3rd Edition

29
**9.3.2a Generalized Least Squares Estimation**

The nonlinear least squares estimator only requires that the errors be stable (not necessarily stationary). Other methods commonly used make stronger demands on the data, namely that the errors be covariance stationary. Furthermore, the nonlinear least squares estimator gives you an unconditional estimate of the autocorrelation parameter and yields a simple t-test of the hypothesis of no serial correlation. Monte Carlo studies show that it performs well in small samples as well. Principles of Econometrics, 3rd Edition

30
**9.3.2a Generalized Least Squares Estimation**

But nonlinear least squares requires more computational power than linear estimation, …though this is not much of a constraint these days. Nonlinear least squares (and other nonlinear estimators) use numerical methods rather than analytical ones to find the minimum of your sum of squared errors objective function. The routines that do this are iterative. Principles of Econometrics, 3rd Edition

31
**9.3.3 Estimating a More General Model**

(9.26) (9.27) We should then test the above restrictions (testing nonlinear restrictions is a possibility) (9.28) Principles of Econometrics, 3rd Edition

32
**9.3.3 Estimating a More General Model**

(9.26) (9.27) This restricted model could be estimated with OLS as long as v is well behaved, because there are no nonlinearities Check that our intuition of having dynamics given by lagged effects of errors boils down to having lagged effects of dependent and independent variables!!! Principles of Econometrics, 3rd Edition

33
**9.4 Testing for Autocorrelation**

9.4.1 Residual Correlogram (9.29) (9.30) Principles of Econometrics, 3rd Edition

34
**9.4 Testing for Autocorrelation**

9.4.1 Residual Correlogram (more practically…) (9.31) (9.32) Principles of Econometrics, 3rd Edition

35
9.4.1 Residual Correlogram Figure 9.4 Correlogram for Least Squares Residuals from Sugar Cane Example Principles of Econometrics, 3rd Edition

36
9.4.1 Residual Correlogram Figure 9.4 Correlogram for Least Squares Residuals from Sugar Cane Example In GRETL… Principles of Econometrics, 3rd Edition

37
9.4.1 Residual Correlogram For this nonlinear model, then, the residuals should be uncorrelated Principles of Econometrics, 3rd Edition

38
9.4.1 Residual Correlogram Figure 9.5 Correlogram for Nonlinear Least Squares Residuals from Sugar Cane Example with “whitened” error Principles of Econometrics, 3rd Edition

39
**9.4.2 A Lagrange Multiplier Test**

Another way to determine whether or not your residuals are autocorrelated is to use an LM (Lagrange multiplier) test. For autocorrelation, this test is based on an auxiliary regression where lagged OLS residuals are added to the original regression equation. If the coefficient on the lagged residual is significant then you conclude that the model is autocorrelated. Principles of Econometrics, 3rd Edition

40
**9.4.2 A Lagrange Multiplier Test**

(9.33) We can derive the auxiliary regression for the LM test: (9.34) First result from GRETL but it comes from the Rearranged regression format with residual as the dependent variable Contrary to what the book suggests!!! Principles of Econometrics, 3rd Edition

41
**9.4.2 A Lagrange Multiplier Test**

(9.35) Centered around zero, so the power of this test now would come from The lagged error, which is what we care about… Second result from GRETL Principles of Econometrics, 3rd Edition

42
**9.4.2 A Lagrange Multiplier Test**

(9.35) This was the Breusch-Godfrey LM test for autocorrelation and it is distributed chi-sq In STATA: regress la lp estat bgodfrey Principles of Econometrics, 3rd Edition

43
**9.4.2 A Lagrange Multiplier Test**

There are other variants of this test Note that it is only valid in large samples (theoretically infinitely big ones) GRETL also reports Ljung-Box Q‘ test, which is good even if you do not have a regression to work with and just want to analyze any given time series but it is less powerful than Breusch-Godfrey’s test when the null hypothesis of no autocorrelation is false… The number of lags gives you the df for the chi-sq and the smaller df for the F distributions you need See appendix for popular (if infamous!) Durbin-Watson test and variants Principles of Econometrics, 3rd Edition

44
**Stata code * --------------------------------------------------**

* LM test regress la lp estat bgodfrey * Note: we set ehat(1) = 0 in order to match result in text. In practice this is unnecessary. predict ehat, residual gen ehat_1=L.ehat replace ehat_1 = 0 in 1 regress ehat lp ehat_1 di (e(N))*e(r2) Principles of Econometrics, 3rd Edition

45
GRETL code You should be able to work it out from these notes and by comparing to the STATA code!!! Principles of Econometrics, 3rd Edition

46
**9.5 An Introduction to Forecasting: Autoregressive Models**

In general, p should be large enough so that vt is white noise (9.36) Adding lagged values of y can serve to eliminate the error autocorrelation (9.37) Principles of Econometrics, 3rd Edition

47
**9.5 An Introduction to Forecasting: Autoregressive Models**

Figure 9.6 Correlogram for Least Squares Residuals from AR(3) Model for Inflation Helps decide How many lags To include in the model Principles of Econometrics, 3rd Edition

48
**9.5 An Introduction to Forecasting: Autoregressive Models**

(9.38) Principles of Econometrics, 3rd Edition

49
**9.5 An Introduction to Forecasting: Autoregressive Models**

(9.39) Principles of Econometrics, 3rd Edition

50
**9.5 An Introduction to Forecasting: Autoregressive Models**

Principles of Econometrics, 3rd Edition

51
**9.5 An Introduction to Forecasting: Autoregressive Models**

(9.40) (9.41) (9.42) Principles of Econometrics, 3rd Edition

52
**9.5 An Introduction to Forecasting: Autoregressive Models**

(9.43) Principles of Econometrics, 3rd Edition

53
**9.6 Finite Distributed Lags**

This model is just a generalization of the ones previously discussed. In this model you include lags of the dependent variable (autoregressive) and the contemporaneous and lagged values of independent variables as regressors (distributed lags). The acronym is ARDL(p,q) where p is the maximum distributed lag and q is the maximum autoregressive lag Principles of Econometrics, 3rd Edition

54
**9.6 Finite Distributed Lags**

(9.44) Principles of Econometrics, 3rd Edition

55
**9.6 Finite Distributed Lags**

Principles of Econometrics, 3rd Edition

56
**9.6 Finite Distributed Lags**

Principles of Econometrics, 3rd Edition

57
**9.7 Autoregressive Distributed Lag Models**

(9.45) (9.46) Principles of Econometrics, 3rd Edition

58
**9.7 Autoregressive Distributed Lag Models**

Figure 9.7 Correlogram for Least Squares Residuals from Finite Distributed Lag Model Principles of Econometrics, 3rd Edition

59
**9.7 Autoregressive Distributed Lag Models**

(9.47) Principles of Econometrics, 3rd Edition

60
**9.7 Autoregressive Distributed Lag Models**

Figure 9.8 Correlogram for Least Squares Residuals from Autoregressive Distributed Lag Model Principles of Econometrics, 3rd Edition

61
**9.7 Autoregressive Distributed Lag Models**

Principles of Econometrics, 3rd Edition

62
**9.7 Autoregressive Distributed Lag Models**

Figure 9.9 Distributed Lag Weights for Autoregressive Distributed Lag Model Principles of Econometrics, 3rd Edition

63
**Keywords autocorrelation interim multiplier**

autoregressive distributed lag models lag length lagged dependent variable autoregressive error LM test autoregressive model nonlinear least squares correlogram sample autocorrelation function delay multiplier standard error of forecast error distributed lag weight total multiplier dynamic models form of LM test finite distributed lag forecast error forecasting HAC standard errors impact multiplier infinite distributed lag Principles of Econometrics, 3rd Edition

64
**Chapter 9 Appendices Appendix 9A Generalized Least Squares Estimation**

Appendix 9B The Durbin Watson Test Appendix 9C Deriving ARDL Lag Weights Appendix 9D Forecasting: Exponential Smoothing Principles of Econometrics, 3rd Edition

65
**Appendix 9A Generalized Least Squares Estimation**

Principles of Econometrics, 3rd Edition

66
**Appendix 9A Generalized Least Squares Estimation**

Principles of Econometrics, 3rd Edition

67
**Appendix 9A Generalized Least Squares Estimation**

Principles of Econometrics, 3rd Edition

68
**Appendix 9A Generalized Least Squares Estimation**

Principles of Econometrics, 3rd Edition

69
**Appendix 9B The Durbin-Watson Test**

Principles of Econometrics, 3rd Edition

70
**Appendix 9B The Durbin-Watson Test**

Principles of Econometrics, 3rd Edition

71
**Appendix 9B The Durbin-Watson Test**

Principles of Econometrics, 3rd Edition

72
**Appendix 9B The Durbin-Watson Test**

Figure 9A.1: Principles of Econometrics, 3rd Edition

73
**Appendix 9B 9B.1 The Durbin-Watson Bounds Test**

The Durbin-Watson test. used to be the standard and is exact (it works in small samples) comes out of almost every software package’s default output it is easy to calculate but the critical values depend on the values of the variables=> unless you have a computer to look up the exact distribution…you are stuck DW did provide the upper and lower distributions but then test may end up being inconclusive Principles of Econometrics, 3rd Edition

74
**Appendix 9B 9B.1 The Durbin-Watson Bounds Test**

Figure 9A.2: Principles of Econometrics, 3rd Edition

75
**Appendix 9B 9B.1 The Durbin-Watson Bounds Test**

if the test is inconclusive. The size of the inconclusive area shrinks with sample size Principles of Econometrics, 3rd Edition

76
**Appendix 9B 9B.1 The Durbin-Watson Bounds Test**

The Durbin-Watson test. used to be the standard, but…: it cannot handle lagged values of the dependent variable (it is biased for autoregressive moving average models, so that autocorrelation is underestimated) But for large samples one can compute the unbiased normally distributed h-statistic or Durbin’s alternative test statistic ) But then Breusch-Godfrey test is much more powerful instead Principles of Econometrics, 3rd Edition

77
**Appendix 9B 9B.1 The Durbin-Watson Bounds Test**

The Durbin-Watson test. used to be the standard, but…: it assumes normality of the errors it cannot handle more than one lag (it detects only AR1 autocorrelation) Principles of Econometrics, 3rd Edition

78
**Appendix 9B 9B.1 The Durbin-Watson Bounds Test**

Also remember that the Durbin-Watson test assumes that that there is an intercept in the model that the X regressors are nonstochastic that there are no missing values in the series Principles of Econometrics, 3rd Edition

79
**Appendix 9C Deriving ARDL Lag Weights**

Principles of Econometrics, 3rd Edition

80
**Appendix 9C 9C.1 The Geometric Lag**

Principles of Econometrics, 3rd Edition

81
**Appendix 9C 9C.1 The Geometric Lag**

Principles of Econometrics, 3rd Edition

82
**Appendix 9C 9C.1 The Geometric Lag**

Principles of Econometrics, 3rd Edition

83
**Appendix 9C 9C.1 The Geometric Lag**

Principles of Econometrics, 3rd Edition

84
**Appendix 9C 9C.2 Lag Weights for More General ARDL Models**

Principles of Econometrics, 3rd Edition

85
**Appendix 9D Forecasting: Exponential Smoothing**

Principles of Econometrics, 3rd Edition

86
**Appendix 9D Forecasting: Exponential Smoothing**

Figure 9A.3: Exponential Smoothing Forecasts for two alternative values of α Principles of Econometrics, 3rd Edition

Similar presentations

OK

1 MF-852 Financial Econometrics Lecture 10 Serial Correlation and Heteroscedasticity Roy J. Epstein Fall 2003.

1 MF-852 Financial Econometrics Lecture 10 Serial Correlation and Heteroscedasticity Roy J. Epstein Fall 2003.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on maggi in india Ppt on p&g products images Ppt on management by objectives Ppt on harvest festivals of india Ppt on p&g products brands tide Ppt on area of parallelogram and triangle Download ppt on civil disobedience movement protest Chapter 1 introduction to human anatomy and physiology ppt on cells Ppt online open enrollment Ppt on network security threats