Module 8 Forecasting for ARMA and ARIMA Models Class notes for Statistics 451: Applied Time Series Iowa State University Copyright 2015 W. Q. Meeker. November 11, 2015 17h 20min 8-1 Module 8 Segment 1 Forecast Errors and Forecast Error Variances 8-2 Forecasting Future Values From an ARIMA Model The ARIMA model for Zt is φp(B)Zt = θ0 + θq (B)at or, in the unscrambled form Zt = θ0 + φ1Zt−1 + · · · + φpZt−p − θ1at−1 − · · · − θq at−q + at Assume that we have data Z1, Z2, . . . , Zn and we want to forecast Zn+l , (i.e., l steps ahead from forecast origin n). Then the actual value is Zn+l = θ0+φ1Zn+l−1+· · ·+φpZn+l−p−θ1an+l−1−· · ·−θq an+l−q +an+l The “minimum mean square error” forecast for Zn+l is Zbn(l) = θ0+φ1[Zn+l−1]+· · ·+φp[Zn+l−p]−θ1[an+l−1]−· · ·−θq [an+l−q ] For quantities inside [ ], substitute value if known, forecast if unknown: Zbn(l − k) for Zn+l−k and 0 for an+l−k . 8-3 ARMA Model Forecast Equation in Infinite MA Form The ARMA model for Zt is Zt = θ0′ + ψ∞(B)at where θ0′ = E(Zt) = θ0/(1 − φ1 − · · · − φp ). Expanding ψ∞(B) gives Zt = θ0′ + ψ1at−1 + ψ2at−2 + ψ3at−3 + · · · + at Assume that we have data Z1, Z1, . . . , Zn and we want to forecast Zn+l , (i.e., l steps ahead from forecast origin n). Then the actual value is Zn+l = θ0′ + ψ1an+l−1 + ψ2an+l−2 + ψ3an+l−3 + · · · + an+l The “minimum mean square error” forecast for Zn+l is Zbn(l) = θ0′ + ψ1[an+l−1] + ψ2[an+l−2] + ψ3[an+l−3] + · · · This form is not very useful for computing forecasts, but is useful in finding a simple expression for the forecast error. 8-4 Forecast Error and Forecast Error Variances One step-ahead (l = 1): Zn+1 = θ0′ + ψ1an + ψ2an−1 + ψ3an−2 + · · · + an+1 Zbn(1) = θ0′ + ψ1an + ψ2an−1 + ψ3an−2 + · · · en (1) = Zn+1 − Zbn(1) = an+1. Var[en(1)] = Var(an+1) = σa2 Two steps-ahead (l = 2): Zn+2 = θ0′ + ψ1an+1 + ψ2an + ψ3an−1 + · · · + an+2 Zbn(2) = θ0′ + ψ1[an+1] + ψ2an + ψ3an−1 + · · · = θ0′ + 0 + ψ2an + ψ3an−1 + · · · en (2) = Zn+2 − Zbn(2) = an+2 + ψ1an+1 Var[en (2)] = Var(an+2 + ψ1an+1) = Var(an+2) + ψ12Var(an+1) = σa2(1 + ψ12). 8-5 Forecast Error and Forecast Error Variances Three steps-ahead (l = 3): Zn+3 = θ0′ + ψ1an+2 + ψ2an+1 + ψ3an + · · · + an+3 Zbn(3) = θ0′ + ψ1[an+2] + ψ2[an+1] + ψ3an + · · · = θ0′ + 0 + 0 + ψ3an + · · · en (3) = Zn+3 − Zbn(3) = an+3 + ψ1an+2 + ψ2an+1 Var[en (3)] = Var(an+3 + ψ1an+2 + ψ2an+1) = σa2(1 + ψ12 + ψ22). In general, l steps-ahead: Zbn(l) = θ0′ + 0 + 0 + · · · + ψl an + ψl+1an−1 + · · · en(l) = Zn+l − Zbn(l) = an+l + ψ1an+l−1 + · · · + ψl−1an+1 2 Var[en(l)] = σa2(1 + ψ12 + · · · + ψl−1 ) = σa2 l−1 X ψi2, where ψ0 ≡ 1 i=0 8-6 Module 8 Segment 2 AR Models and Forecasts for the Sunspot Process 8-7 100 50 0 Yearly Smoothed Sunspots 150 Wolfer Sunspot Numbers 1770-1869 1780 1800 1820 1840 1860 Year 8-8 Function iden Output for the Wolfer Sunspot Numbers 1770-1869 Wolfer Sunspots 0 50 w 100 150 w= Number of Spots 1780 1800 1820 1840 1860 time ACF 0.0 -1.0 120 ACF 140 0.5 1.0 Range-Mean Plot 100 10 20 30 Lag 0.5 0.0 -1.0 60 Partial ACF 1.0 80 PACF 40 Range 0 20 30 40 50 Mean 60 70 0 10 20 30 Lag 8-9 Function iden Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 Wolfer Sunspots w 0 2 4 6 8 10 12 w= ( Number of Spots ) ^ 0.5 1780 1800 1820 1840 1860 time ACF 0.0 8 -1.0 9 ACF 0.5 1.0 Range-Mean Plot 0 10 20 30 Range Lag 0.5 0.0 -1.0 5 Partial ACF 6 1.0 7 PACF 4 5 6 Mean 7 8 0 10 20 30 Lag 8 - 10 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(1) Model—Part 1 Wolfer Sunspots Model: Component 1 :: ar: 1 on w= ( Number of Spots ) ^ 0.5 -2 0 Residuals 2 4 Residuals vs. Time 1780 1800 1820 1840 1860 Time Residual ACF 1.0 Residuals vs. Fitted Values • 4 • • • • • • • -2 • • • • • • • • • • • •• • ••• • • • • • •• • • • • • •• • • • • • • • • • • • • • • • • • • • •• • • • • • • • 4 • •• • • • 2 0.0 • ACF • • • •• • -0.5 Residuals 0 • • • • • • • • • • •• -1.0 2 • • 0.5 • • • 6 Fitted Values 8 10 0 10 20 30 Lag 8 - 11 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(1) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • 1840 • 1860 1880 Index Normal Probability Plot • 1 2 • 0 • Normal Scores • 1780 • • • •• ••• • •• • • •• ••• •• •• •• • • -1 • • • • • • • • -2 • • • • • 0 Number of Spots • • • • • •• •• • •• • • • • •••• ••• •••• • • • •••• •••• •••• ••• • •• • • • • • -2 0 2 4 Residuals 8 - 12 Comparison of Models for the Sunspot Data Transformation γ (1,0,0) 0.5 ARIMA(p, d, q) Model (2,0,0) (2,0,0) (3,0,0) 0.5 1 0.5 (16,0,0) 0.5 φ2 0.83 (15.1) — φ3 — 1.40 (19.4) −0.69 (−9.5) — φ16 — — 1.41 (20.0) −0.71 (−10.1) — — — 1,3,4,5,6 — — — — 1.59 1.15 15.09 1.15 1.02 383.8 377.8 323.07 315.07 837.2 829.2 323.9 313.9 328.9 292.9 83.5 9.2 12.9 7.66 6.25 φ1 b) Sig. ρbk (a S AICc −2 log(Likelihood) Ljung-Box χ2 6 1.48 (14.9) −0.84 (−5.3) 0.11 (1.08) — 1.44 (3.0) −0.83 (−4.8) 0.04 (0.2) −0.26 (−2.3) 8 - 13 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(2) Model—Part 1 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= ( Number of Spots ) ^ 0.5 0 -3 -2 -1 Residuals 1 2 3 Residuals vs. Time 1780 1800 1820 1840 1860 Time Residual ACF 1.0 Residuals vs. Fitted Values • 3 • • • • • • • • • • • • • • • •• • • • • •• • • • • • • • • • • •• • • • • •• • • • • • • • •• • • • • • • •• • • • • • • • • • • • • • • • • • • • • -3 -2 •• • •• -1 • • • -1.0 0 • 0.5 • • • 0.0 1 • • ACF 2 • Residuals • •• -0.5 • 2 4 6 Fitted Values 8 10 12 0 10 20 30 Lag 8 - 14 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(2) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • • • • • • • • 1840 • • • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • • • • • • • • • 1860 1880 Index Normal Probability Plot • 1 2 • 0 1780 • Normal Scores • • • • • • -1 • • • • • • • • • -2 • • • • 0 Number of Spots • • •• • •• ••• ••• ••• • • •• •• • •• •• •• • • ••• •••• ••• • •• • • •• •• ••• ••• ••• • •• •• •• • • • • • -3 -2 -1 0 1 2 3 Residuals 8 - 15 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(1) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • 1840 • 1860 1880 Index Normal Probability Plot • 1 2 • 0 • Normal Scores • 1780 • • • •• ••• • •• • • •• ••• •• •• •• • • -1 • • • • • • • • -2 • • • • • 0 Number of Spots • • • • • •• •• • •• • • • • •••• ••• •••• • • • •••• •••• •••• ••• • •• • • • • • -2 0 2 4 Residuals 8 - 16 Function esti Output for the Wolfer Sunspot Numbers 1770-1869 (no transformation) AR(2) Model—Part 1 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= Number of Spots 0 -40 -20 Residuals 20 40 Residuals vs. Time 1780 1800 1820 1840 1860 Time Residual ACF 1.0 Residuals vs. Fitted Values • 40 • 0.5 • • 0 -20 • • • • • • •• •• • • •• • • • • • • • • •••• • • • • ACF • • • • • • • • • • • • • • • 0 0.0 • • • • -0.5 • • • • • •• •• • • • • • • • •• •• •• • • •• ••• • • • • • • • • • • • 50 100 Fitted Values 150 -1.0 20 • • • -40 Residuals • 0 10 20 30 Lag 8 - 17 Function esti Output for the Wolfer Sunspot Numbers 1770-1869 (no transformation) AR(2) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= Number of Spots Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • • • • • • • • • • • 1840 • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • 1860 1880 Index Normal Probability Plot • 1 2 • 0 1780 • • • Normal Scores • • • -1 • • • • • • • • • • -2 • • • • • 0 Number of Spots • • • •• •• • • •• •• • • • • •• ••• ••• ••• • •• • •• ••• • •• •••• •••••• • •• •• ••• •• ••• ••• •• • • • • -40 -20 0 20 40 Residuals 8 - 18 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(2) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • • • • • • • • 1840 • • • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • • • • • • • • • 1860 1880 Index Normal Probability Plot • 1 2 • 0 1780 • Normal Scores • • • • • • -1 • • • • • • • • • -2 • • • • 0 Number of Spots • • •• • •• ••• ••• ••• • • •• •• • •• •• •• • • ••• •••• ••• • •• • • •• •• ••• ••• ••• • •• •• •• • • • • • -3 -2 -1 0 1 2 3 Residuals 8 - 19 0.0 -0.5 -850 -1330 -1300 -1200 -1100 -1000 -900 -1.0 ar(2) 0.5 1.0 Plot of AR(2) Model Log-likelihood Surface for the Square Root Wolfer Sunspot Data -2 -1 0 1 2 ar(1) 8 - 20 -1100 -1050 -1000 -950 -0.4 -0.6 -0.8 -850 -900 -1.0 ar(2) -0.2 0.0 0.2 Plot of AR(2) Model Log-likelihood Surface for the Square Root Wolfer Sunspot Data 0.8 1.0 1.2 1.4 1.6 1.8 2.0 ar(1) 8 - 21 Module 8 Segment 3 Higher-Order AR Models and Forecasts for the Sunspot Process and Eventual Forecasts 8 - 22 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(3) Model—Part 1 Wolfer Sunspots Model: Component 1 :: ar: 1 2 3 on w= ( Number of Spots ) ^ 0.5 0 -3 -2 -1 Residuals 1 2 3 Residuals vs. Time 1780 1800 1820 1840 1860 Time Residual ACF 1.0 Residuals vs. Fitted Values • • • • • • • •• 0 • • • • • • • -1 • • • •• • -2 • • • • • • • • • • • • • • • • • • • • • • • • • 0.5 • • • • • • •• •• • • • • • • • •• • • • • • •• • • • • • • • • • • • 0.0 1 • • ACF 2 • • • • -1.0 • -3 Residuals • •• -0.5 3 • • 2 4 6 Fitted Values 8 10 12 0 10 20 30 Lag 8 - 23 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(3) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 3 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 1840 • • 1860 1880 Index Normal Probability Plot • 2 • • • • 1 1780 • 0 • Normal Scores • • • -1 • • • • • • • • • -2 • • • • • • • • • • • 0 Number of Spots • • •• •• • • ••• •• ••• ••• • • •• •• •••• ••••• •••• •••• •••• ••• •• • • ••• •••• •• • •• • •• •• • • • • • • -3 -2 -1 0 1 2 3 Residuals 8 - 24 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(2) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • • • • • • • • 1840 • • • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • • • • • • • • • 1860 1880 Index Normal Probability Plot • 1 2 • 0 1780 • Normal Scores • • • • • • -1 • • • • • • • • • -2 • • • • 0 Number of Spots • • •• • •• ••• ••• ••• • • •• •• • •• •• •• • • ••• •••• ••• • •• • • •• •• ••• ••• ••• • •• •• •• • • • • • -3 -2 -1 0 1 2 3 Residuals 8 - 25 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(16) Model—Part 1 Wolfer Sunspots Model: Component 1 :: ar: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 on w= ( Number of Spots ) ^ 0.5 0 -2 -1 Residuals 1 2 3 Residuals vs. Time 1780 1800 1820 1840 1860 Time Residual ACF 1.0 3 Residuals vs. Fitted Values • • 2 • • •• -1 • • • • • •• • •• • • • • •• • ••• • ••• • • • • •• • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • -1.0 • • 2 0.0 1 0 • •• • • • -2 Residuals • • • • • • ACF • -0.5 • 0.5 • 4 6 Fitted Values 8 10 12 0 10 20 30 Lag 8 - 26 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(16) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • • 1840 • • • • • • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • • • • • • • • • 1860 1880 Index Normal Probability Plot • 2 • 1 1780 • • • 0 • • • • • • Normal Scores • • -1 • • • • • • • • • • -2 • 0 Number of Spots • • • •• ••• ••• •••• • •• •• •• ••• • •• •• •• •• •• ••• ••• • • ••• ••• ••• •••• ••• •• •• •• • • • • -2 -1 0 1 2 3 Residuals 8 - 27 Function esti Output based on the Square Roots of the Wolfer Sunspot Numbers 1770-1869 AR(2) Model—Part 2 Wolfer Sunspots Model: Component 1 :: ar: 1 2 on w= ( Number of Spots ) ^ 0.5 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • • • • • 100 • • • • • • • • • • • 50 • • • • • • • • • • • • • • • • • • • • • • • • 1820 • • • • • • • • • • • • • • • • • • • • • • • 1840 • • • • • • • • • • • • • • • • • • 1800 • • • • • • • • • • • • • • • • • • • • • • • 1860 1880 Index Normal Probability Plot • 1 2 • 0 1780 • Normal Scores • • • • • • -1 • • • • • • • • • -2 • • • • 0 Number of Spots • • •• • •• ••• ••• ••• • • •• •• • •• •• •• • • ••• •••• ••• • •• • • •• •• ••• ••• ••• • •• •• •• • • • • • -3 -2 -1 0 1 2 3 Residuals 8 - 28 Comparison of Models for the Sunspot Data Transformation γ (1,0,0) 0.5 ARIMA(p, d, q) Model (2,0,0) (2,0,0) (3,0,0) 0.5 1 0.5 (16,0,0) 0.5 φ2 0.83 (15.1) — φ3 — 1.40 (19.4) −0.69 (−9.5) — φ16 — — 1.41 (20.0) −0.71 (−10.1) — — — 1,3,4,5,6 — — — — 1.59 1.15 15.09 1.15 1.02 383.8 377.8 323.07 315.07 837.2 829.2 323.9 313.9 328.9 292.9 83.5 9.2 12.9 7.66 6.25 φ1 b) Sig. ρbk (a S AICc −2 log(Likelihood) Ljung-Box χ2 6 1.48 (14.9) −0.84 (−5.3) 0.11 (1.08) — 1.44 (3.0) −0.83 (−4.8) 0.04 (0.2) −0.26 (−2.3) 8 - 29 Prediction Interval for Zn+l A 95% prediction interval for Zn+l (l steps ahead) is q Zbn(l) ± 1.96 Var[en (l)] For one step-ahead the simplifies to Zbn(1) ± 1.96σa For two steps-ahead the simplifies to q Zbn(2) ± 1.96σa 1 + ψ12 For three steps-ahead the simplifies to q Zbn(3) ± 1.96σa 1 + ψ12 + ψ22 and so on. When computing prediction intervals from data, we substitute estimates for parameters, giving approximate prediction intervals (i.e., substitute φb1 for φ1, . . . , φbp for φp, θb1 b a = S for σa ). for θ1, . . . θbq for θq , and σ 8 - 30 Eventual (Long-run) Forecasts For stationary time series, from Zbn(l) = θ0′ + 0 + 0 + · · · + ψl an + ψl+1an−1 + ψl+2an−2 + · · · because the ψ weights die down, the long-run forecast is lim Zbn(l) = θ0′ = E(Zt) l→∞ and from en(l) = Zn+l − Zbn(l) = an+l + ψ1an+l−1 + · · · + ψl−1an+1 we can see that because 2 Var[en(l)] = σa2(1 + ψ12 + · · · + ψl−1 ), lim Var[en(l)] = σa2(1 + ψ12 + ψ22 + · · · ) = Var(Zt) l→∞ For nonstationary time series, things are more complicated, but the forecast-error variance grows without bound because the ψ weights do not die down. 8 - 31 Module 8 Segment 4 Modeling and Forecasts for the Savings Rate Process 8 - 32 Function iden Output for the Savings Rate Data US Savings Rate for 1955-1980 4 5 6 w 7 8 9 w= Percent of Disposable Income 1960 1970 1980 time ACF 0.0 -1.0 2.5 ACF 3.0 0.5 1.0 Range-Mean Plot 10 20 30 2.0 Lag 0.5 0.0 -1.0 1.0 Partial ACF 1.0 1.5 PACF 0.5 Range 0 4.5 5.0 5.5 6.0 6.5 Mean 7.0 7.5 0 10 20 30 Lag 8 - 33 Function iden Output for the First Differences of the Savings Rate Data -2 0 w 1 2 3 US Savings Rate for 1955-1980 w= (1-B)^ 1 Percent of Disposable Income 1960 1970 1980 time -1.0 0.0 Partial ACF 0.0 -1.0 ACF 1.0 PACF 1.0 ACF 0 10 20 Lag 30 0 10 20 30 Lag 8 - 34 Function esti Output for the Savings Rate Data ARMA(1,2) Model—Part 1 US Savings Rate for 1955-1980 Model: Component 1 :: ma: 1 2 ar: 1 on w= Percent of Disposable Income 1 -1 0 Residuals 2 3 Residuals vs. Time 1960 1970 1980 Time Residual ACF 1.0 3 Residuals vs. Fitted Values 0.5 2 • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • •• • • •• ••• • •• • • • • • • • • • • • • • • • ACF • • • 5 6 7 Fitted Values -0.5 • • • • •• • • •• •• • • • • ••• •• • • • • •• • • -1.0 1 • -1 Residuals • •• 0 • • • • 0.0 • • • 8 0 10 20 30 Lag 8 - 35 Function esti Output for the Savings Rate Data ARMA(1,2) Model—Part 2 US Savings Rate for 1955-1980 Model: Component 1 :: ma: 1 2 ar: 1 on w= Percent of Disposable Income 10 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * • • 6 • •• • • • • • • • • • • • • • •• • • • • • 4 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • •• • • •• • • • • •• • • • • • • • • • • 2 • • • 0 1965 1970 1975 1980 1985 Index Normal Probability Plot • 1 2 • 0 Normal Scores 1960 -1 1955 • -2 Percent of Disposable Income 8 • • • • •• ••• •• ••• • • •• •• ••• ••• • • • ••• ••• ••• ••• ••• •• ••• •• ••• • • • •• •• • • •• •• • • • -1 0 1 2 3 Residuals 8 - 36 Comparison of Models for the Savings Rate Data d (# differences) (1,0,0) 0 θ1 0.81 (13.7) — θ2 — φ1 b) Sig. ρbk (a S AICc −2 log(Likelihood) Ljung-Box χ2 6 ARIMA(p, d, q) Model (1,0,1) (1,0,2) (0,1,1) 0 0 1 0.87 0.77 (15.0) (8.51) −0.15 −0.064 (−1.6) (−0.52) — 0.32 (2.93) (0,1,2) 1 — — −0.20 −0.18 (−2.40) (−1.86) — 0.24 (2.23) 1, 2 2 — 1 — 0.69 0.68 0.65 0.70 0.68 224.5 218.5 224.0 216.0 218.4 208.4 222.4 218.5 220.2 214.2 11.2 8.31 2.60 1.06 5.04 8 - 37 Function esti Output for the Savings Rate Data ARIMA(0,1,1) Model—Part 1 US Savings Rate for 1955-1980 Model: Component 1 :: ndiff= 1 ma: 1 on w= Percent of Disposable Income 1 -2 -1 0 Residuals 2 3 Residuals vs. Time 1960 1970 1980 Time Residual ACF 1.0 Residuals vs. Fitted Values 0.5 •• • •• • • • • • • • • • • •• • • • • • • • • • • • • •• • • • • • • • • • • • • • •• • •• • •• • •• •• • •• • • •• • • • • • •• • • • • • •• • • •• • • • • • • • -1.0 • • 5 6 0.0 • • ACF • -0.5 1 0 •• • -1 • • •• -2 Residuals 2 3 • 7 Fitted Values 8 9 0 10 20 30 Lag 8 - 38 Function esti Output for the Savings Rate Data ARIMA(0,1,1) Model—Part 2 US Savings Rate for 1955-1980 Model: Component 1 :: ndiff= 1 ma: 1 on w= Percent of Disposable Income 10 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * • • 6 • •• • • • • • • • • • • • • • •• • • • • • 4 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • •• • • •• • • •• • • • •• • • •• • • • 2 • 0 1965 1970 1975 1980 1985 Index Normal Probability Plot • 1 2 • 0 Normal Scores 1960 -1 1955 • • -2 Percent of Disposable Income 8 • • • • • • • • • •• •• ••• •• •• • • • •• •• •••• •• • • •• ••• •••• ••• ••• • • ••• ••• ••• •••• • ••• • -2 -1 0 1 2 3 Residuals 8 - 39 Function esti Output for the Savings Rate Data ARMA(1,2) Model—Part 2 US Savings Rate for 1955-1980 Model: Component 1 :: ma: 1 2 ar: 1 on w= Percent of Disposable Income 10 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * • • 6 • •• • • • • • • • • • • • • • •• • • • • • 4 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • •• • • •• • • • • •• • • • • • • • • • • 2 • • • 0 1965 1970 1975 1980 1985 Index Normal Probability Plot • 1 2 • 0 Normal Scores 1960 -1 1955 • -2 Percent of Disposable Income 8 • • • • •• ••• •• ••• • • •• •• ••• ••• • • • ••• ••• ••• ••• ••• •• ••• •• ••• • • • •• •• • • •• •• • • • -1 0 1 2 3 Residuals 8 - 40 Function esti Output for the Savings Rate Data ARIMA(0,1,2) Model—Part 1 US Savings Rate for 1955-1980 Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Percent of Disposable Income 1 -1 0 Residuals 2 3 Residuals vs. Time 1960 1970 1980 Time Residual ACF 1.0 3 Residuals vs. Fitted Values 0.5 2 • • • • • • • • • • • • • • • • • • • • • •• •• • • • • • • • •• • • • • • • • • ••• • • ••• •• • • • • • • •• •• • • • • • • • • 5 6 7 Fitted Values 0.0 • • •• ACF • •• • • • • • •• • • • • • • • • • • -0.5 • -1.0 Residuals 1 0 -1 • • • • • • • • 8 9 0 10 20 30 Lag 8 - 41 Function esti Output for the Savings Rate Data ARIMA(0,1,2) Model—Part 2 US Savings Rate for 1955-1980 Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Percent of Disposable Income 10 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * • • 6 • •• • • • • • • • • • • • • • •• • • • • • 4 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • •• • • •• • • •• • • • •• • • •• • • • 2 • • 0 1965 1970 1975 1980 1985 Index Normal Probability Plot 0 1 2 • Normal Scores 1960 -1 1955 • • -2 Percent of Disposable Income 8 • •• •• • • •• •••• •• •••• •• •• • • • ••• ••• ••• ••• •••• •• •• ••• ••• •• ••• ••• •• •• • • • • • • • -1 0 1 2 3 Residuals 8 - 42 Function esti Output for the Savings Rate Data ARIMA(0,1,1) Model—Part 2 US Savings Rate for 1955-1980 Model: Component 1 :: ndiff= 1 ma: 1 on w= Percent of Disposable Income 10 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * • • 6 • •• • • • • • • • • • • • • • •• • • • • • 4 • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • •• • • •• • • •• • • • •• • • •• • • • 2 • 0 1965 1970 1975 1980 1985 Index Normal Probability Plot • 1 2 • 0 Normal Scores 1960 -1 1955 • • -2 Percent of Disposable Income 8 • • • • • • • • • •• •• ••• •• •• • • • •• •• •••• •• • • •• ••• •••• ••• ••• • • ••• ••• ••• •••• • ••• • -2 -1 0 1 2 3 Residuals 8 - 43 Comparison of Models for the Savings Rate Data d (# differences) (1,0,0) 0 θ1 0.81 (13.7) — θ2 — φ1 b) Sig. ρbk (a S AICc −2 log(Likelihood) Ljung-Box χ2 6 ARIMA(p, d, q) Model (1,0,1) (1,0,2) (0,1,1) 0 0 1 0.87 0.77 (15.0) (8.51) −0.15 −0.064 (−1.6) (−0.52) — 0.32 (2.93) (0,1,2) 1 — — −0.20 −0.18 (−2.40) (−1.86) — 0.24 (2.23) 1, 2 2 — 1 — 0.69 0.68 0.65 0.70 0.68 224.5 218.5 224.0 216.0 218.4 208.4 222.4 218.5 220.2 214.2 11.2 8.31 2.60 1.06 5.04 8 - 44 Module 8 Segment 5 Some Practical Considerations and Deterministic Trend 8 - 45 Reasons for Needing a Long Realization • Estimate correlation structure (i.e., the ACF and PACF) functions and get accurate standard errors. • Estimate seasonal pattern (need at least 4 or 5 seasonal periods). • Approximate prediction intervals assume that parameters are known (good approximation if realization is large). • Fewer estimation problems (likelihood function better behaved). • Possible to check forecasts by withholding recent data . • Can check model stability by dividing data and analyzing both sides. 8 - 46 Reasons For Using a Parsimonious Model • Fewer numerical problems in estimation. • Easier to understand the model. • With fewer parameters, forecasts less sensitive to deviations between parameters and estimates. • Parsimonious Models are easier to interpret. • Model may applied more generally to similar processes. • Rapid real-time computations for control or other action. Having a parsimonious model is less important if the realization is large. 8 - 47 Function iden Output for Simulated Series A Simulated Time Series #A 50 100 w 150 w= Sales 20 30 40 50 60 time ACF 0.0 35 -1.0 ACF 40 0.5 1.0 Range-Mean Plot 0 10 20 30 Range Lag 0.5 0.0 -1.0 25 Partial ACF 1.0 30 PACF 60 80 100 120 Mean 140 160 180 0 10 20 30 Lag 8 - 48 Function iden Output for the First Differences of Simulated Series A 0 -40 w 20 Simulated Time Series #A w= (1-B)^ 1 Sales 20 30 40 50 60 time -1.0 0.0 Partial ACF 0.0 -1.0 ACF 1.0 PACF 1.0 ACF 0 10 20 Lag 30 0 10 20 30 Lag 8 - 49 Function esti Output for Simulated Series A IMA(1,2) Model—Part 1 Simulated Time Series #A Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Sales 10 -10 0 Residuals 20 30 Residuals vs. Time 20 30 40 50 60 Time Residual ACF 1.0 Residuals vs. Fitted Values 30 • • • ••• • • • • • • • • •• •• •• • • • • • • • • • • • •• • • • • • • • • • • 60 80 • • • • • •• • • • • • •• • • •• • • •• • • • • • • • • • • • • •• • • • • • •• • • •• • •• •• • • • • • • • •• • • • • • •• • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • •• • • • • •• • • • •• • • • • • • 0.0 • • • • • • • • • ACF 10 • 0 Residuals • • • • • -0.5 •• • • -1.0 20 • • -10 • • 0.5 • • 100 120 Fitted Values 140 160 180 0 10 20 30 Lag 8 - 50 Function esti Output for for Simulated Series A IMA(1,2) Model—Part 2 esti(...,d.trend=FALSE) Simulated Time Series #A Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Sales 200 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • Sales • • • • • • • • • 30 • • • • • •• •• • • • • • • •• • • • • • • •• • • • • • • • • •• • • • • 40 50 •• • • • • • •• • • • • • • • • ••••••••••••••••••••••• • •• • • • • • • • • • • • 60 Index 3 Normal Probability Plot 0 -1 -2 Normal Scores 1 2 • • -3 100 50 20 • • • • •• • • • • • • • • • • • • • • • • •• • • • • • • • • • •• • • • • • • • • • • • •• • • • • • • • • • •• • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• ••• ••• •••• • • •••• ••• ••• •• •• ••• • • • •••• ••• ••••• ••••• • • • • • ••• •••• ••••• ••• ••• • • • ••• ••• •• ••• • • •• •• •• • • •• • • -10 0 10 20 30 Residuals 8 - 51 Function esti Output for Simulated Series A IMA(1,2) Model with Deterministic Trend—Part 1 Simulated Time Series #A Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Sales 0 -10 Residuals 10 20 Residuals vs. Time 20 30 40 50 60 Time •• • • • • • • • • • • •• • • • • • •• •• • • • • • • • • •• • • • • • • • • • • •• • • • • • •• • • • • • • • •• •• • • • •• • • • •• • • • • • • • •• • • • • •• • • • • • 100 • •• • • • • • • •• • • • •• • • • • • • ••• •• •• • • •• • • • • • • • • • • • • • • • • 80 • • • • • • • 60 • • • • • •• • • • 0.5 • • • • 0.0 • • • • • • • • 0 • • •• ACF • •• • -0.5 10 • Residuals • •• • • 120 Fitted Values 140 • 160 • -1.0 20 • • • -10 Residual ACF 1.0 Residuals vs. Fitted Values 180 0 10 20 30 Lag 8 - 52 Function esti Output for for Simulated Series A IMA(1,2) Model with Deterministic Trend—Part 2 esti(...,d.trend=TRUE) Simulated Time Series #A Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Sales 200 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * ••• • • • • • •• • • •• • • • • •••• •• • • •• • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • •• • • • • • • • • • •• • • • • • • • • • • • • •• •• • • • • • • • • • • • • • • • • • ••• • • • • • • • • • • •• • • • • •• • •• • • • • • • • • • • • • • •• • • • • • • • • • •• • • • • • • • • • • • • • • • • • • •• • • • • • •• • • •• • 30 40 50 • • 60 Index 3 Normal Probability Plot 0 -1 Normal Scores 1 2 • -2 20 • • -3 50 100 Sales 150 • • ••• ••• ••• • • • •• ••••• •••• •• •••••• • • • • • ••••• •••• •••• •••• • • • ••••• ••• •••• ••••• •••• • • ••• •••• •• • •• • • •• •• •• • •• • • • -10 0 10 20 Residuals 8 - 53 Function esti Output for for Simulated Series A IMA(1,2) Model—Part 2 esti(...,d.trend=FALSE) Simulated Time Series #A Model: Component 1 :: ndiff= 1 ma: 1 2 on w= Sales 200 Actual Values * * * Fitted Values * * * Future Values * * 95 % Prediction Interval * * 150 • Sales • • • • • • • • • 30 • • • • • •• •• • • • • • • •• • • • • • • •• • • • • • • • • •• • • • • 40 50 •• • • • • • •• • • • • • • • • ••••••••••••••••••••••• • •• • • • • • • • • • • • 60 Index 3 Normal Probability Plot 0 -1 -2 Normal Scores 1 2 • • -3 100 50 20 • • • • •• • • • • • • • • • • • • • • • • •• • • • • • • • • • •• • • • • • • • • • • • •• • • • • • • • • • •• • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• ••• ••• •••• • • •••• ••• ••• •• •• ••• • • • •••• ••• ••••• ••••• • • • • • ••• •••• ••••• ••• ••• • • • ••• ••• •• ••• • • •• •• •• • • •• • • -10 0 10 20 30 Residuals 8 - 54 0.0 -0.5 -1600 -2800 -2600 -2400 -2200 -2000 -1800 -1.0 ma(2) 0.5 1.0 Plot of IMA(1,2) Model Log-likelihood Surface for Simulated Series A -2 -1 0 1 2 ma(1) 8 - 55 0.0 -0.5 -1600 -2800 -2600 -2400 -2200 -2000 -1800 -1.0 ma(2) 0.5 1.0 Plot of IMA(1,2) Model Log-likelihood Surface for Simulated Series A -2 -1 0 1 2 ma(1) 8 - 56 -0.55 0.001 -0.60 0.8 0.4 0.1 0.00001 -0.65 ma(2) -0.50 -0.45 -0.40 Plot of IMA(1,2) Model Relative Likelihood Surface for Simulated Series A—Close-up View 0.000010.001 1.1 1.2 1.3 1.4 0.001 1.5 ma(1) 8 - 57 0.2 0.4 Z 0.6 0.8 1 Perspective Plot of IMA(1,2) Model Relative Likelihood Surface for Simulated Series A—Close-up View 0 5 .4 -0 .5 -0 5 .5 1.2 -0 1.3 ma(1) .6 2) a( m -0 1.4 1.5 5 .6 -0 8 - 58
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )