420Hw12ans

March 16, 2018 | Author: Kevin Yau | Category: Autoregressive Model, Forecasting, Time Series, Multivariate Statistics, Data Analysis


Comments



Description

STAT 420Fall 2010 Homework #12 (due Friday, December 10, by 3:00 p.m.) 1. Consider the AR ( 2 ) processes & – 0.3 Y & & Y t t – 1 – 0.1 Y t – 2 = e t where { e t } is zero-mean white noise ( i.i.d. N ( 0, a) σ e2 ) ), Y& t = Y t – µ . Based on a series of length N = 100, we observe …, y 98 = 152, y 99 = 156, y 100 = 147, y = 150. Forecast y 101 and y 102 . YN + 1 = µ + φ1 (YN – µ ) + φ2 (YN – 1 – µ ) + eN + 1 yˆ N +1 = E N ( Y N + 1 ) = µ + φ 1 ( y N – µ ) + φ 2 ( y N – 1 – µ ) YN + 2 = µ + φ1 (YN + 1 – µ ) + φ2 (YN – µ ) + eN + 2 yˆ N + 2 = E N ( Y N + 2 ) = µ + φ 1 ( yˆ N +1 – µ ) + φ 2 ( y N – µ ) yˆ 101 = µˆ + φˆ1 ( y 100 – µˆ ) + φˆ 2 ( y 99 – µˆ ) = 150 + 0.3 ( 147 – 150 ) + 0.1 ( 156 – 150 ) = 149.7. yˆ 102 = µˆ + φˆ1 ( yˆ 101 – µˆ ) + φˆ 2 ( y 100 – µˆ ) = 150 + 0.3 ( 149.7 – 150 ) + 0.1 ( 147 – 150 ) = 149.61. b) Use Yule-Walker equations to find ρ 1 and ρ 2 . The Yule-Walker equations for an AR(2) process: ρ1 = φ1 + φ2 ρ1 ρ2 = φ1 ρ1 + φ2 ρ1 = φ1 + φ2 ρ1 ⇒ ⇒ ρ1 = φ1 1−φ 2 = 0 .3 = 1 . 3 1 − 0. 1 ρ 2 = φ 1 ρ 1 + φ 2 = 0.3 ⋅ 1/3 + 0.1 = 0.20. a) Suppose r 1 = 0. r 2 = – 0.2 φ 1 ⇒ 0. Use Yule-Walker equations to estimate φ 1 and φ 2. ⇒ OR An AR(2) model is stationary if φ 2 < 1. ×5 ×2 ⇒ 2 = 5 φ1 + 2 φ2 – 0. y 60 = 215. φ 2 – φ 1 < 1.40. The Yule-Walker equations for an AR ( 2 ) process are given by: ρ1 = φ1 + φ2 ρ1 ρ2 = φ1 ρ1 + φ2 φ 1 + 0.1 + 0.3 < 1.50.1 B 2 = ( 1 – 0. –1 < ⇒ 2. y = 200.3 B – 0.60 + 0. Both are outside the unit circle.26. 0. y 59 = 190.c) Is this process stationary? Φ ( B ) = 1 – 0. φ 2 + φ 1 < 1.40 φ 2 . | z 2 | > 1.52 = 0.3 < 1.52 = 4. That is. Consider the AR ( 2 ) process Yt = µ + φ1 (Yt – 1 – µ ) + φ2 (Yt – 2 – µ ) + et Based on a series of length N = 60. This process is stationary.2 B ) The roots of Φ ( z ) = 0 are z 1 = 2 and z 2 = – 5.60 – 0. – 1 < 0.40 = 0.1 < 1. we observe ….20 = 0.80 φ 1 + 2 φ 2 φˆ1 = 2.40 φ 1 + φ 2 0.5 B ) ( 1 + 0.1 – 0.2 = 0.40 = ⇒ 2. | z 1 | > 1.26 = 0.40 φ 2 – 0.52/4.40 φ 2 ⇒ φˆ 2 = – 0. The process is stationary. 0. 60 Y & & Y t t − 1 + 0.50 < 1.64 1. OR An AR(2) model is stationary if –1 < φ 2 < 1. yˆ 62 = µˆ + φˆ1 ( yˆ 61 – µˆ ) + φˆ 2 ( y 60 – µˆ ) = 200 + 0.60 ( 200.50 – 0. φ 2 – φ 1 < 1. Roots z 1.64 ) 2 = 2 > 1.60 < 1.64 = 0. – 1 < – 0. Use your answers to part (a) to forecast y 61 .50 ( 215 – 200 ) = 200.50 = 0.60 < 1. – 0.50 z 1.9.b) If φ 1 and φ 2 are equal to your answers to part (a). .60 z + 0.2 are outside of the unit circle: ⇒ 2 = 0.60 ± i 1. y 60 = 215. ⇒ c) φ 2 + φ 1 < 1. y 59 = 190. yˆ 61 = µˆ + φˆ1 ( y 60 – µˆ ) + φˆ 2 ( y 59 – µˆ ) = 200 + 0. y = 200.60 ± 2 ⋅ 0.2 = 0.50 Y t − 2 = e t Φ ( z ) = 1 – 0.60 ( 215 – 200 ) – 0. – 0.9 – 200 ) – 0.60 ( 214 – 200 ) – 0. This process is stationary. This process is stationary. is this process stationary? & – 0.50 z 2 = 0.54. and y 63 . yˆ 63 = µˆ + φˆ1 ( yˆ 62 – µˆ ) + φˆ 2 ( yˆ 61 – µˆ ) = 200 + 0.50 ( 190 – 200 ) = 214.50 + 0.60 ± 0.60 2 − 4 ⋅1 ⋅ 0.50 ( 214 – 200 ) = 193. y 62 .60 2 + ( − 1. ( Y N + 2 – 60 ) = – 0. 59.3.4.3 ( yˆ N +1 – 60 ) = 60 – 0.4 e N + l – 1 l>2 yˆ N + l – 60 = – 0. 58 and the last residual is eˆ N = – 2.3 ) l – 1 ( yˆ N +1 – 60 ) ⇒ yˆ N + l = 60 + 1. 10.4 e t – 1 which was fitted to a time series where the last 10 values are 60.4 e N yˆ N +1 = E N ( Y N + 1 ) = 60 – 0. 67.4 ( – 2 ) = 61.4 eˆ N = 60 – 0.3 ( y N – 60 ) – 0. 61.3 ( Y N – 60 ) + e N + 1 – 0. 59.58.3 ( Y N + l – 1 – 60 ) + e N + l – 0. 1 ) model ( Y t – 60 ) + 0. 57.3 ) l – 1 ⇒ yˆ N + l → 60 as l → ∞ .4 × ( – 0. Calculate the forecasts of the next two observations.3 ( Y N + 1 – 60 ) + e N + 2 – 0.4 e N + 1 yˆ N + 2 = E N ( Y N + 2 ) = 60 – 0.4 – 60 ) = 59. and indicate how forecasts can be calculated for lead times greater than two.3 ( Y t – 1 – 60 ) = e t – 0.24 (a) Consider the ARMA ( 1.3 ( 61.3 ( 58 – 60 ) – 0. 63. 52. ( Y N + 1 – 60 ) = – 0. ( Y N + l – 60 ) = – 0. Show what happens to the forecasts as the lead time becomes arbitrarily large.3 ( yˆ N + l −1 – 60 ) ⇒ yˆ N + l – 60 = ( – 0. 62. 96.29 4 Var ( Y N + 2 – yˆ N + 2 ) = ( 1 + ( – 0. calculate 90-percent probability limits for the next two observations.4 B ) e t = ( 1 – 0.00243B 5 + . 1 ⋅ ( 1 − 0 .58 ± 1. Interpret these limits..063 e t – 3 + … Var ( Y N + 1 – yˆ N +1 ) = 61.For fun: b)* Given σˆ e2 = 4.063 B 3 + … ) e t = e t – 0.09 B 2 − 0.4 B ) e t 1 + 0 .645 × 5.70 ) 2 ) σ e2 .645 × σ e2 .016 .21 B 2 – 0. σˆ e2 = 4.58 ± 4. 61. ⋅ ( 1 − 0.0081B 4 − 0..4 ± 3.027 B 3 + 0. ( 1 + ( – 0. 59.70 B + 0.4 ± 1.70 e t – 1 + 0.21 e t – 2 – 0.96 59.3B + 0.3 B Y t – 60 = ( ) = 1 − 0.70 ) 2 ) σˆ e2 = 5. 4.order=c(2.S. for t' < t fit = arima(ur.ts) Based on the sample ACF and PACF. unemployment rate series..uiuc. frequency=4) par(mfrow=c(3.ts) #plots time series title("U.n.0)) fit #prints results c) for all t #fits an AR(2) with mean included Diagnostic Checking: tsdiag(fit) #diagnostic plots Based on the first two diagnostics plots.S.edu/stepanov/www/ur. These are seasonally adjusted quarterly rates from 1948-1978. for t ≠ t' E ( e t Y t' ) = 0.ts.ahead=2) predfit2 #prints results #forecasts 2 steps ahead . start=1948. Unemployment Rate") a) #make a time series object Model Identification: acf(ur.ts) pacf(ur. we will forecast the next 2 quarters ahead using predict function..dat contains the U.1)) #3 plots per page plot(ur. what is an appropriate model? b) Estimation: Fit an AR ( 2 ) model to the data using MLE. https://netfiles. /ur. predfit2 = predict(fit.0.ts = ts(ur.dat") ur. AR ( 2 ): ( Yt – µ ) – φ1 ( Yt – 1 – µ ) – φ2 ( Yt – 2 – µ ) = e t E ( e t ) = 0. ur = scan(" . is AR(2) an appropriate model? d) Forecasting: Now. Var ( e t ) = σ e2 E ( e t e t' ) = 0. scan("http://www.ts <.edu/~stepanov/ur. Unemployment Rate") > acf(ur. frequency=4) > par(mfrow=c(3. PACF “cuts off” after lag 2.dat") Read 121 items > ur.> ur <.S. This is consistent with an AR(2) model. start=1948.ts) > pacf(ur.uiuc.ts(ur.stat.ts) > title("U. .ts) ACF smoothly “dies out”.1)) > plot(ur. 5499 -0. 0.ts.3269 sigma^2 estimated as 0.0)) > fit Call: arima(x = ur. order = c(2.76.0. 0)) Coefficients: ar1 ar2 1.53 . aic = 105.0681 0. 0.6472 s.> fit <.ts.e.1276: > tsdiag(fit) log likelihood = -48.0815 0.order=c(2.0686 intercept 5.arima(ur. Standardized Residuals seem “random” and bell-shared (a lot of them are close to zero. > predfit2 <. with just a few away from zero). only one is outside ( – 3. The ACF of the Residuals looks like the ACF of white noise – the only significant autocorrelation coefficient is ρ 0 = 1.491268 $se Qtr2 Qtr3 1978 0. Most of the Standardized Residuals are between – 2 and 2.6589087 .ahead=2) > predfit2 $pred Qtr2 Qtr3 1978 5.n. 3 ).3572328 0.predict(fit.812919 5. This suggests that AR(2) is indeed an appropriate model.Standardized Residuals plot does not appear to have noticible patterns.
Copyright © 2024 DOKUMEN.SITE Inc.