Presentation is loading. Please wait.

Presentation is loading. Please wait.

TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more.

Similar presentations


Presentation on theme: "TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more."— Presentation transcript:

1 TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more technical method involving unit root tests. Autocorrelation function for k = 1,...

2 TESTING FOR NONSTATIONARITY 2 We will start with the graphical method. The autocorrelation function of a series X t gives the theoretical correlation between the value of the series at time t and its value at time t + k, for values of k from 1 to (typically) about 20. Autocorrelation function for k = 1,...

3 TESTING FOR NONSTATIONARITY 3 For example, the autocorrelation coefficient  k for an AR(1) process is  2 k. Autocorrelation function Autocorrelation function of an AR(1) process for k = 1,...

4 TESTING FOR NONSTATIONARITY 4 For stationary processes the autocorrelation coefficients tend to 0 quite quickly as k increases. The figure shows the correlogram for an AR(1) process with  2 = 0.8. Correlogram of an AR(1) process

5 TESTING FOR NONSTATIONARITY 5 Higher order AR(p) processes will exhibit more complex behavior, but if they are stationary, the coefficients will eventually decline to 0. Correlogram of an AR(1) process

6 TESTING FOR NONSTATIONARITY 6 A moving average MA(q) process has nonzero weights for only the first q lags and 0 weights thereafter. Correlogram of an AR(1) process

7 TESTING FOR NONSTATIONARITY 7 In the case of nonstationary processes, the theoretical autocorrelation coefficients are not defined but one may be able to obtain an expression for E(r k ), the expected value of the sample autocorrelation coefficients. For long time series, these coefficients decline slowly. Correlogram of a random walk

8 TESTING FOR NONSTATIONARITY 8 The figure shows the correlogram for a random walk with 200 observations. Correlogram of a random walk

9 TESTING FOR NONSTATIONARITY 9 Hence time series analysts can make an initial judgment as to whether a time series is nonstationary or not by computing its sample correlogram and seeing how quickly the coefficients decline. Correlogram of a random walk

10 TESTING FOR NONSTATIONARITY 10 There are, however, two problems with using correlograms to identify nonstationarity. One is that a correlogram such as that shown above could result from a stationary AR(1) process with a high value of  2. Correlogram of a random walk

11 TESTING FOR NONSTATIONARITY 11 The other problem is that the coefficients of a nonstationary process may decline quite rapidly if the series is not long. This is illustrated in the figure above, which shows the expected values of r k for a random walk when the series has only 50 observations. Correlogram of a random walk

12 TESTING FOR NONSTATIONARITY 12 A more formal method of detecting nonstationarity is often described as testing for unit roots, for reasons that are too technical to be explained here.

13 TESTING FOR NONSTATIONARITY 13 This remainder of this sequence will explain the logic behind the Augmented Dickey–Fuller test for nonstationarity and will apply the test to some of the series in the Demand Functions data set.

14 TESTING FOR NONSTATIONARITY 14 We will start with the very simple process shown above. For most economic series you can rule out the possibility that  2 is greater than 1, for that would imply that the series is explosive. Likewise you can rule out the possibility that it is less than –1.

15 TESTING FOR NONSTATIONARITY 15 In practice, there will be just two possibilities:  2 = 1, and –1 <  2 < 1. If  2 = 1, the process is nonstationary because its variance increases with t. If  2 lies between 1 and –1, the variance is fixed and the series is stationary.

16 TESTING FOR NONSTATIONARITY 16 The test is intended to discriminate between the two possibilities. The null hypothesis is that the process is nonstationary. We need a specific value of  2 when we define the null hypothesis, so we make H 0 :  2 = 1. The alternative hypothesis is then H 1 :  2 < 1.

17 TESTING FOR NONSTATIONARITY 17 Before performing the test, it is convenient to rewrite the model subtracting X t–1 from both sides. To perform the test, we regress  X t on X t–1 and test whether the slope coefficient is significantly different from 0.

18 TESTING FOR NONSTATIONARITY 18 One can generalize the test to allow for more complex dynamics. Here, for example, we hypothesize that X t may depend on X t–2 as well as X t–1.

19 TESTING FOR NONSTATIONARITY 19 The condition for nonstationarity is now  2 +  3 = 1, and for stationarity  2 +  3 < 1. (The condition for stationarity is actually necessary but not sufficient. We will not be concerned with the other conditions.)

20 TESTING FOR NONSTATIONARITY 20 It will be convenient to rewrite the null and alternative hypotheses as shown.

21 TESTING FOR NONSTATIONARITY 21 We will now manipulate the model so that the null hypothesis can be tested with a t test. First, subtract X t–1 from both sides.

22 TESTING FOR NONSTATIONARITY 2 Then add  3 X t–1 to the right side and subtract it again.

23 TESTING FOR NONSTATIONARITY 23 Combine the second and third terms on the right side.

24 TESTING FOR NONSTATIONARITY 24 Combine the terms with common factor  3.

25 TESTING FOR NONSTATIONARITY 25 Regress  X t on X t–1 and  X t–1, and perform a t test on the coefficient of X t–1. Note that if the null hypothesis is true, and the process is nonstationary, the conventional critical values of t will be invalid. We will need to use different ones that are valid under the null hypothesis.

26 TESTING FOR NONSTATIONARITY 26 By adding a time trend, and performing a t test on its coefficient, the model can be extended to test for deterministic nonstationarity as well.

27 TESTING FOR NONSTATIONARITY 27 Here is the logarithmic series for expenditure on housing in the Demand Functions data set. It is clearly nonstationary, but nevertheless we will perform a formal test. LGHOUS

28 TESTING FOR NONSTATIONARITY 28 In EViews you can perform a test of nonstationarity by clicking on the name of the series to be tested, clicking on the View tab in the window that opens, and then clicking on Unit Root Test on the menu that appears. LGHOUS

29 Augmented Dickey-Fuller Unit Root Test on LGHOUS ============================================================ Augmented Dickey-Fuller test statistic -1.691709 0.7378 Test critical values1% level -4.186481 5% level -3.518090 10% level -3.189732 ============================================================ Dependent Variable: D(LGHOUS) Method: Least Squares Sample(adjusted): 1961 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ LGHOUS(-1) -0.034904 0.020632 -1.691709 0.0987 D(LGHOUS(-1)) 0.274772 0.149339 1.839923 0.0734 C 0.232945 0.117491 1.982662 0.0545 @TREND(1959) 0.000576 0.000672 0.855999 0.3972 ============================================================ TESTING FOR NONSTATIONARITY 29 The slide shows the relevant part of the output for LGHOUS. You can see that  X t has been regressed on X t–1,  X t–1, and a trend.

30 TESTING FOR NONSTATIONARITY 30 The key items are the coefficient of X t–1, here LGHOUS(–1), and its t statistic. The coefficient is close to 0, as it would be under the null hypothesis of nonstationarity. Augmented Dickey-Fuller Unit Root Test on LGHOUS ============================================================ Augmented Dickey-Fuller test statistic -1.691709 0.7378 Test critical values1% level -4.186481 5% level -3.518090 10% level -3.189732 ============================================================ Dependent Variable: D(LGHOUS) Method: Least Squares Sample(adjusted): 1961 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ LGHOUS(-1) -0.034904 0.020632 -1.691709 0.0987 D(LGHOUS(-1)) 0.274772 0.149339 1.839923 0.0734 C 0.232945 0.117491 1.982662 0.0545 @TREND(1959) 0.000576 0.000672 0.855999 0.3972 ============================================================

31 TESTING FOR NONSTATIONARITY 31 The t statistic is reproduced at the top of the output, where it is described as the Augmented Dickey–Fuller test statistic. Augmented Dickey-Fuller Unit Root Test on LGHOUS ============================================================ Augmented Dickey-Fuller test statistic -1.691709 0.7378 Test critical values1% level -4.186481 5% level -3.518090 10% level -3.189732 ============================================================ Dependent Variable: D(LGHOUS) Method: Least Squares Sample(adjusted): 1961 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ LGHOUS(-1) -0.034904 0.020632 -1.691709 0.0987 D(LGHOUS(-1)) 0.274772 0.149339 1.839923 0.0734 C 0.232945 0.117491 1.982662 0.0545 @TREND(1959) 0.000576 0.000672 0.855999 0.3972 ============================================================

32 TESTING FOR NONSTATIONARITY 32 EViews calculates the critical values for you. In this case you would not reject the null hypothesis that LGHOUS is a nonstationary series. The test result thus corroborates the conclusion we drew looking at the graph. Augmented Dickey-Fuller Unit Root Test on LGHOUS ============================================================ Augmented Dickey-Fuller test statistic -1.691709 0.7378 Test critical values1% level -4.186481 5% level -3.518090 10% level -3.189732 ============================================================ Dependent Variable: D(LGHOUS) Method: Least Squares Sample(adjusted): 1961 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ LGHOUS(-1) -0.034904 0.020632 -1.691709 0.0987 D(LGHOUS(-1)) 0.274772 0.149339 1.839923 0.0734 C 0.232945 0.117491 1.982662 0.0545 @TREND(1959) 0.000576 0.000672 0.855999 0.3972 ============================================================

33 D(LGHOUS) TESTING FOR NONSTATIONARITY 33 Here is the series for the first differences in the logarithm of expenditure on housing. Does it look stationary or nonstationary?

34 TESTING FOR NONSTATIONARITY 34 The differenced logarithms of a series give the proportional changes in each period. It looks as if the average growth rate has fallen from about 5 percent per year at te beginning of the series to about 2.5 percent at the end. D(LGHOUS)

35 Augmented Dickey-Fuller Unit Root Test on DLGHOUS ============================================================ Augmented Dickey-Fuller test statistic -4.518902 0.0042 Test critical values1% level -4.192337 5% level -3.520787 10% level -3.191277 ============================================================ Dependent Variable: D(DLGHOUS) Method: Least Squares Sample(adjusted): 1962 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ DLGHOUS(-1) -0.833121 0.184363 -4.518902 0.0001 D(DLGHOUS(-1)) 0.232715 0.161176 1.443855 0.1570 C 0.043288 0.010121 4.277022 0.0001 @TREND(1959) -0.000668 0.000181 -3.691100 0.0007 ============================================================ TESTING FOR NONSTATIONARITY 35 However, the coefficient is far from 0 and it has a high t statistic. We can reject the null hypothesis of nonstationarity at the 1 percent level.

36 TESTING FOR NONSTATIONARITY 36 Thus it would appear that LGHOUS can be rendered stationary by differencing once. It would therefore be described as I(1). (Short for integrated of order 1.) Augmented Dickey-Fuller Unit Root Test on DLGHOUS ============================================================ Augmented Dickey-Fuller test statistic -4.518902 0.0042 Test critical values1% level -4.192337 5% level -3.520787 10% level -3.191277 ============================================================ Dependent Variable: D(DLGHOUS) Method: Least Squares Sample(adjusted): 1962 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ DLGHOUS(-1) -0.833121 0.184363 -4.518902 0.0001 D(DLGHOUS(-1)) 0.232715 0.161176 1.443855 0.1570 C 0.043288 0.010121 4.277022 0.0001 @TREND(1959) -0.000668 0.000181 -3.691100 0.0007 ============================================================

37 LGDPI TESTING FOR NONSTATIONARITY 37 Here is the logarithmic series for income. It is also clearly nonstationary.

38 Augmented Dickey-Fuller Unit Root Test on LGDPI ============================================================ Augmented Dickey-Fuller test statistic -2.322310 0.4134 Test critical values1% level -4.186481 5% level -3.518090 10% level -3.189732 ============================================================ Dependent Variable: D(LGDPI) Method: Least Squares ple(adjusted): 1961 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ LGDPI(-1) -0.120908 0.052064 -2.322310 0.0255 D(LGDPI(-1)) 0.107910 0.147515 0.731520 0.4688 C 0.947906 0.390441 2.427787 0.0199 @TREND(1959) 0.003580 0.001737 2.061228 0.0460 ============================================================ TESTING FOR NONSTATIONARITY 38 The coefficient is small with a low t statistic, giving support to the null hypothesis of nonstationarity.

39 D(LGDPI) TESTING FOR NONSTATIONARITY 39 Here is the series for the first differences in the logarithm of income. It looks stationary.

40 Augmented Dickey-Fuller Unit Root Test on DLGDPI ============================================================ Augmented Dickey-Fuller test statistic -4.125167 0.0119 Test critical values1% level -4.192337 5% level -3.520787 10% level -3.191277 ============================================================ Dependent Variable: D(DLGDPI) Method: Least Squares Sample(adjusted): 1962 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ DLGDPI(-1) -0.892399 0.216330 -4.125167 0.0002 D(DLGDPI(-1)) -0.045015 0.158840 -0.283400 0.7784 C 0.041368 0.011109 3.723927 0.0006 @TREND(1959) -0.000453 0.000225 -2.007941 0.0518 ============================================================ TESTING FOR NONSTATIONARITY 40 The coefficient is now a long way from 0. The t statistic is significant at the 5 percent level but not quite at the 1 percent level.

41 Augmented Dickey-Fuller Unit Root Test on DLGDPI ============================================================ Augmented Dickey-Fuller test statistic -4.125167 0.0119 Test critical values1% level -4.192337 5% level -3.520787 10% level -3.191277 ============================================================ Dependent Variable: D(DLGDPI) Method: Least Squares Sample(adjusted): 1962 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ DLGDPI(-1) -0.892399 0.216330 -4.125167 0.0002 D(DLGDPI(-1)) -0.045015 0.158840 -0.283400 0.7784 C 0.041368 0.011109 3.723927 0.0006 @TREND(1959) -0.000453 0.000225 -2.007941 0.0518 ============================================================ TESTING FOR NONSTATIONARITY 41 One of the problems with the ADF and similar tests is that they appear to be weak in terms of power. Often one is unable to reject the null hypothesis of nonstationarity, even when there is good reason to believe that it is incorrect.

42 Augmented Dickey-Fuller Unit Root Test on DLGDPI ============================================================ Augmented Dickey-Fuller test statistic -4.125167 0.0119 Test critical values1% level -4.192337 5% level -3.520787 10% level -3.191277 ============================================================ Dependent Variable: D(DLGDPI) Method: Least Squares Sample(adjusted): 1962 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ DLGDPI(-1) -0.892399 0.216330 -4.125167 0.0002 D(DLGDPI(-1)) -0.045015 0.158840 -0.283400 0.7784 C 0.041368 0.011109 3.723927 0.0006 @TREND(1959) -0.000453 0.000225 -2.007941 0.0518 ============================================================ TESTING FOR NONSTATIONARITY 42 In this case, given the large size of the coefficient, –0.89, it would be reasonable to suppose that the series is stationary.

43 LGPRHOUS TESTING FOR NONSTATIONARITY 43 Finally we will look at the logarithmic series for the price index. It is so flat that we have to use a large scale to see anything at all. Stationary or nonstationary?

44 TESTING FOR NONSTATIONARITY 44 Hard to call. It could be a stationary process with a very high degree of autocorrelation, or it could be a random walk. LGPRHOUS

45 Augmented Dickey-Fuller Unit Root Test on LGPRHOUS ============================================================ Augmented Dickey-Fuller test statistic -1.420016 0.8408 Test critical values1% level -4.186481 5% level -3.518090 10% level -3.189732 ============================================================ Dependent Variable: D(LGPRHOUS) Method: Least Squares Sample(adjusted): 1961 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ LGPRHOUS(-1) -0.048259 0.033985 -1.420016 0.1635 D(LGPRHOUS(-1)) 0.504742 0.140567 3.590749 0.0009 C 0.209124 0.150738 1.387337 0.1732 @TREND(1959) 0.000410 0.000189 2.170909 0.0361 ============================================================ TESTING FOR NONSTATIONARITY 45 The coefficient is close to 0 and the t statistic is small. We do not reject the null hypothesis of nonstationarity.

46 D(LGPRHOUS) TESTING FOR NONSTATIONARITY 46 Here are the first differences. This series looks stationary.

47 Augmented Dickey-Fuller Unit Root Test on DLPRHOUS ============================================================ Augmented Dickey-Fuller test statistic -4.611691 0.0033 Test critical values1% level -4.192337 5% level -3.520787 10% level -3.191277 ============================================================ Dependent Variable: D(DLPRHOUS) Method: Least Squares Sample(adjusted): 1962 2003 ============================================================ Variable Coefficient Std. Error t-Statistic Prob. ============================================================ DLPRHOUS(-1) -0.720856 0.156311 -4.611691 0.0000 D(DLPRHOUS(-1)) 0.349962 0.153860 2.274546 0.0287 C -0.007368 0.004294 -1.716005 0.0943 @TREND(1959) 0.000407 0.000174 2.335997 0.0249 ============================================================ TESTING FOR NONSTATIONARITY 47 In this case the t statistic allows us to reject the null hypothesis of nonstationarity at the 1 percent level.

48 Copyright Christopher Dougherty 2000–2006. This slideshow may be freely copied for personal use. 21.08.06


Download ppt "TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more."

Similar presentations


Ads by Google