Chapter 12 Autocorrelation in Time Series Data
Total Page:16
File Type:pdf, Size:1020Kb
238 Chapter 12 Autocorrelation in Time Series Data In a time series model, Yi = ¯0 + ¯1Xi + "i; i = 1; : : : ; n; 1 we allow the "i errors to be correlated with one another; that is, ½("i; "j) = 0, i = j. 6 6 12.1 Problems of Autocorrelation If we treat a time series model as a simple linear regression model; that is, we assume ½("i; "j) = 0 when, in fact, ½("i; "j) = 0, then the variance in the error terms of the time series model will be underestimated.6 Any con¯dence intervals or tests for the time series model in this case would then be suspect. 1 By way of comparison, in a simple linear regression model, we assume the error "i have zero covariance, σ("i; "j ) = 0. Also recall, covariance and correlation are closely related to one another and, in particular, σ("i; "j ) = 0, i = j implies ½("i; "j ) = 0, i = j. 6 6 239 240 Chapter 12. Autocorrelation in Time Series Data (ATTENDANCE 11) Exercise 12.1 (Problems of Autocorrelation) 1. The errors in (a) below are (circle one) not autocorrelated / autocorrelated because they fluctuate at random above and below zero (0). error error error 20 20 20 10 10 10 0 0 0 -10 -10 -10 -20 -20 -20 0 2.5 5 7.5 10 0 2.5 5 7.5 10 0 2.5 5 7.5 10 time time time (a) uncorrelated e e (b) correlated e = e + u (c) correlated t = t-1 + u t t-1 t t where e = 10 where e = -10 0 0 Figure 12.1 (Positively Autocorrelated Error Terms) time, t 1 2 3 4 5 6 7 8 9 10 error, "t 1 2 4 -1 -5 0 2 -1 2 2 2. The errors in (b) above are positively autocorrelated because adjacent error terms tend to be of the same magnitude. time, t 0 1 2 3 4 5 6 7 8 9 10 not autocorrelated error, ut 1 2 4 -1 -5 0 2 -1 2 2 autocorrelated error, "t = "t¡1 + ut 10 11 13 17 16 11 11 13 12 14 16 In this case, all of the errors fluctuate at random above the horizontal line at (choose one) ¡10 / 0 / 10 3. Consider the errors in (c) above. time, t 0 1 2 3 4 5 6 7 8 9 10 not autocorrelated error, ut 1 2 4 -1 -5 0 2 -1 2 2 autocorrelated error, "t = "t¡1 + ut -10 -9 -7 -3 -4 -9 -9 -7 -8 -6 -4 There errors are (circle one) positively / negatively autocorrelated because even though adjacent error terms are all negative, they all tend to be of the same magnitude. Negative correlation occurs when "t = "t¡1 + ut, that is, when adjacent error terms are all of the same absolute magnitude,¡ but opposite in sign. Section 1. Problems of Autocorrelation (ATTENDANCE 11) 241 4. Match residual plots with scatter plots error error error 20 20 20 10 10 10 0 0 0 -10 -10 -10 -20 -20 -20 0 2.5 5 7.5 10 0 2.5 5 7.5 10 0 2.5 5 7.5 10 time time time (a) residual plot 1 (b) residual plot 2 (c) residual plot 3 Y Y Y 50 50 50 40 40 40 30 30 30 20 20 20 0 0 0 0 2.5 5 7.5 10 0 2.5 5 7.5 10 0 2.5 5 7.5 10 time time time (d) scatter plot 1 (e) scatter plot 2 (f) scatter plot 3 Figure 12.2 (Residual plots and associated scatter plots) Match the residual plots with the scatter plots. Residual plot (a) (b) (c) Scatter plot 5. Problem of detecting autocorrelation What if we were unaware that the simple linear regression was, in fact, a time series model? That is, what if we assumed ½("i; "j) = 0 when, in fact, we should have assumed ½("i; "j) = 0? In this case, we would draw scatterplot (choose one) (d) / (e)6 / (f) in the ¯gure above. In other words, it seems that autocorrelation is di±cult to detect. 242 Chapter 12. Autocorrelation in Time Series Data (ATTENDANCE 11) 6. What if Positively Autocorrelated Error Goes Undetected? Y Y 50 50 40 actual regression fitted error fitted regression 40 actual error 30 30 20 20 0 0 0 2.5 5 7.5 10 0 2.5 5 7.5 10 time time (a) undetected positive autocorrelation (b) detected positive autocorrelation Figure 12.3 (What if Positively Autocorrelated Error Goes Undetected?) If the positive autocorrelated error remains undetected, then the ¯tted error terms are (choose one) smaller / larger than the actual error terms. 7. More What if Positively Autocorrelated Error Goes Undetected? If the positive autocorrelated error remains undetected, this means the variance of the error terms in model is often (circle one) underestimated / overesti- mated. Implications of this are (a) the M SE may underestimate the variance of error terms, (b) s bk may underestimated the standard deviation of the estimated regres- f g sion coe±cient, bk, (c) estimated regression coe±cients may still be unbiased, but no longer have minimum variance, and this all implies the con¯dence intervals and tests, using the t and F distri- butions, can not really be used for inference purposes. 8. Property of Positively Autocorrelated Error When errors are positively autocorrelated, initial error, "0, tends to (circle one) die out quickly (tend to zero) linger (stay at the same magnitude). Consequently, to detect positive autocorrelated error, it makes sense to create a measure that detects error that lingers at the same magnitude. 9. Autocorrelation Versus Cross Correlation True / False The word autocorrelation refers to the analysis of the correlation of error vari- ables in one times series; cross correlation would refer to the analysis of the correlation of error variables in di®erent time series. Section 2. First{Order Autoregressive Error Model (ATTENDANCE 11) 243 12.2 First{Order Autoregressive Error Model The simple ¯rst{order autoregressive error model is Yt = ¯0 + ¯1Xt + "t "t = ½"t¡1 + ut 2 where ½ < 1 and ut are independent N(0; σ ) and ½ is the autocorrelation parameter. In a similarj j way, the multiple ¯rst{order autoregressive error model is Yt = ¯ + ¯ Xt + ¯ Xt + + ¯p¡ Xt;p¡ + "t 0 1 1 2 2 ¢ ¢ ¢ 1 1 "t = ½"t¡1 + ut 2 where, again, ½ < 1 and ut are independent N(0; σ ). Notice, in particular, we j j assume in this model that the error "t terms depend on one another according to "t = ½"t¡1 + ut. Exercise 12.2 (Properties of First{Order Autoregressive Error Model) 1. True / False 2 The one and only way the error "t terms can depend on one another is according to "t = ½"t¡1 + ut. 2. If ½ = 1, "t = ½"t¡1 + ut = "t¡1 + ut In this case, the magnitude of the error now, at time t, is (choose one) less than / equal to / greater than the magnitude of the error one time unit in the past, at time t 1. ¡ 3. If ½ = 1, the error terms are (choose one) positively autocorrelated / uncorrelated / negatively au- tocorrelated 4. If ½ = 1, the error terms are (choose¡one) positively autocorrelated / uncorrelated / negatively au- tocorrelated 5. If ½ = 0, "t = ½"t¡1 + ut = ut where, recall, ut are assumed to be independent. In this case, the error terms are (choose one) positively autocorrelated / uncorrelated / negatively au- tocorrelated 2 We assume the error "t terms depend on one another in this way because is it reasonable and the mathematics work out this way. 244 Chapter 12. Autocorrelation in Time Series Data (ATTENDANCE 11) 6. Mean E "t = 0. Even thoughf g the error terms are autocorrelated, they (circle one) are / are not unbiased. 2 σ2 7. Variance σ "t = 2 . f g 1¡½ The smaller, closer to zero (0), the correlation parameter ½ is, the (circle one) closer / farther away the variance of autocorrelated error terms is to the variance of unautocorrelated error terms, σ2. σ2 8. Covariance σ "t; "t¡ = ½ 2 = ½· f 1g 1¡½ If the error terms are not auto³ correlated´ (½ = 0), the covariance is (circle one) zero / one / in¯nity. 9. Correlation ½ "t; "t¡1 = ½ If the error termsf aregnot autocorrelated (½ = 0), the correlation (standardized covariance) is (circle one) zero / one / in¯nity. s σ2 s 10. Covariance s time periods apart, σ "t; "t¡s = ½ 2 = ½ · f g 1¡½ The covariance s time periods apart, σ "t; "t¡s , is³(circle´one) smaller / larger f g than the covariance one time period apart, σ "t; "t¡ because 0 ½ 1 f 1g · · s 11. True / False. Correlation s time periods apart, ½ "t; "t¡s = ½ f g 12. True / False The variance{covariance matrix is · ·½ ·½n¡1 2 . ¢ ¢ ¢ . σ " = . £f g 2 3 n n ·½n¡1 ·½n¡2 ¢ ¢ ¢ · 6 ¢ ¢ ¢ 7 4 5 σ2 where · = 1¡½2 Section 3. Durbin{Watson Test for Autocorrelation (ATTENDANCE 11) 245 12.3 Durbin{Watson Test for Autocorrelation SAS program: att11-12-3-read-durbin If the Durbin{Watson test statistic, n 2 t=2(et et¡1) D = ¡ ; et = Yt Y^t n e2 ¡ P t=1 i is small, then this indicates "t P"t¡1, or, in other words, that the error terms are positively autocorrelated with one¼ another. In fact, if D > dU ½ = 0; not autocorrelated dL < D < dU undetermined, or weakly autocorrelated D < dL ½ > 0; positive autocorrelated where dU and dL are found in Table B.7, pages 1349{1350. Exercise 12.3 (Durbin{Watson Test for Autocorrelation) illumination, X 1 2 3 4 5 6 7 8 9 10 ability to read, Y 70 70 75 88 91 94 100 92 90 85 1.