lecture 10
play

Lecture 10 Seasonal Arima 10/05/2018 1 Australian Wine Sales - PowerPoint PPT Presentation

Lecture 10 Seasonal Arima 10/05/2018 1 Australian Wine Sales Example (Lecture 6) Australian total wine sales by wine makers in bottles <= 1 litre. Jan 1980 2 Aug 1994. wineind 40000 30000 20000 1980 1985 1990 1995 0.6 0.6


  1. Lecture 10 Seasonal Arima 10/05/2018 1

  2. Australian Wine Sales Example (Lecture 6) Australian total wine sales by wine makers in bottles <= 1 litre. Jan 1980 – 2 Aug 1994. wineind 40000 30000 20000 1980 1985 1990 1995 0.6 0.6 PACF ACF 0.3 0.3 0.0 0.0 −0.3 −0.3 12 24 36 12 24 36 Lag Lag

  3. Differencing 3 diff(wineind) 10000 0 −10000 −20000 1980 1985 1990 1995 0.5 0.5 PACF ACF 0.0 0.0 −0.5 −0.5 12 24 36 12 24 36 Lag Lag

  4. 𝜚 𝑞 (𝑀) = 1 − 𝜚 1 𝑀 − 𝜚 2 𝑀 2 − … − 𝜚 𝑞 𝑀 𝑞 𝜄 𝑟 (𝑀) = 1 + 𝜄 1 𝑀 + 𝜄 2 𝑀 2 + … + 𝜄 𝑞 𝑀 𝑟 Δ 𝑒 = (1 − 𝑀) 𝑒 Φ 𝑄 (𝑀 𝑡 ) = 1 − Φ 1 𝑀 𝑡 − Φ 2 𝑀 2𝑡 − … − Φ 𝑄 𝑀 𝑄𝑡 Θ 𝑅 (𝑀 𝑡 ) = 1 + Θ 1 𝑀 + Θ 2 𝑀 2𝑡 + … + 𝜄 𝑞 𝑀 𝑅𝑡 𝑡 = (1 − 𝑀 𝑡 ) 𝐸 Seasonal Arima We can extend the existing Arima model to handle these higher order lags (without having to include all of the intervening lags). Seasonal ARIMA (𝑞, 𝑒, 𝑟) × (𝑄, 𝐸, 𝑅) 𝑡 : Φ 𝑄 (𝑀 𝑡 ) 𝜚 𝑞 (𝑀) Δ 𝐸 where Δ 𝐸 4 𝑡 Δ 𝑒 𝑧 𝑢 = 𝜀 + Θ 𝑅 (𝑀 𝑡 ) 𝜄 𝑟 (𝑀) 𝑥 𝑢

  5. Seasonal Arima We can extend the existing Arima model to handle these higher order lags (without having to include all of the intervening lags). Seasonal ARIMA (𝑞, 𝑒, 𝑟) × (𝑄, 𝐸, 𝑅) 𝑡 : Φ 𝑄 (𝑀 𝑡 ) 𝜚 𝑞 (𝑀) Δ 𝐸 where Δ 𝐸 4 𝑡 Δ 𝑒 𝑧 𝑢 = 𝜀 + Θ 𝑅 (𝑀 𝑡 ) 𝜄 𝑟 (𝑀) 𝑥 𝑢 𝜚 𝑞 (𝑀) = 1 − 𝜚 1 𝑀 − 𝜚 2 𝑀 2 − … − 𝜚 𝑞 𝑀 𝑞 𝜄 𝑟 (𝑀) = 1 + 𝜄 1 𝑀 + 𝜄 2 𝑀 2 + … + 𝜄 𝑞 𝑀 𝑟 Δ 𝑒 = (1 − 𝑀) 𝑒 Φ 𝑄 (𝑀 𝑡 ) = 1 − Φ 1 𝑀 𝑡 − Φ 2 𝑀 2𝑡 − … − Φ 𝑄 𝑀 𝑄𝑡 Θ 𝑅 (𝑀 𝑡 ) = 1 + Θ 1 𝑀 + Θ 2 𝑀 2𝑡 + … + 𝜄 𝑞 𝑀 𝑅𝑡 𝑡 = (1 − 𝑀 𝑡 ) 𝐸

  6. Seasonal Arima for wineind - AR 0.8780 BIC=3302.29 AICc=3292.92 ## AIC=3292.78 log likelihood=-1643.39 ## sigma^2 estimated as 6906536: ## 1154.48 0.0314 ## s.e. 24489.24 ## Lets consider an ARIMA (0, 0, 0) × (1, 0, 0) 12 : mean sar1 ## ## Coefficients: ## ## ARIMA(0,0,0)(1,0,0)[12] with non-zero mean ## Series: wineind (m1.1 = forecast:: Arima (wineind, seasonal= list (order= c (1,0,0), period=12))) 5 (1 − Φ 1 𝑀 12 ) 𝑧 𝑢 = 𝜀 + 𝑥 𝑢 𝑧 𝑢 = Φ 1 𝑧 𝑢−12 + 𝜀 + 𝑥 𝑢

  7. Fitted model 6 Model 1.1 − Arima (0,0,0) x (1,0,0)[12] [RMSE: 2613.05] 40000 30000 sales wineind model 20000 1980 1985 1990 1995 time

  8. Seasonal Arima for wineind - Diff Lets consider an ARIMA (0, 0, 0) × (0, 1, 0) 12 : (m1.2 = forecast:: Arima (wineind, seasonal= list (order= c (0,1,0), period=12))) ## Series: wineind ## ARIMA(0,0,0)(0,1,0)[12] ## ## sigma^2 estimated as 7259076: log likelihood=-1528.12 ## AIC=3058.24 AICc=3058.27 BIC=3061.34 7 (1 − 𝑀 12 ) 𝑧 𝑢 = 𝜀 + 𝑥 𝑢 𝑧 𝑢 = 𝑧 𝑢−12 + 𝜀 + 𝑥 𝑢

  9. Fitted model 8 Model 1.2 − Arima (0,0,0) x (0,1,0)[12] [RMSE: 2600.8] 40000 30000 sales wineind model 20000 1980 1985 1990 1995 time

  10. Residuals - Model 1.1 9 m1.1$residuals 5000 0 −5000 −10000 1980 1985 1990 1995 0.1 0.1 PACF ACF 0.0 0.0 −0.1 −0.1 −0.2 −0.2 12 24 36 12 24 36 Lag Lag

  11. Residuals - Model 1.2 10 m1.2$residuals 5000 0 −5000 −10000 1980 1985 1990 1995 0.2 0.2 0.1 0.1 PACF 0.0 0.0 ACF −0.1 −0.1 −0.2 −0.2 −0.3 −0.3 12 24 36 12 24 36 Lag Lag

  12. Model 2 ## BIC=3050.88 AICc=3044.76 ## AIC=3044.68 log likelihood=-1520.34 ## sigma^2 estimated as 6588531: ## 0.0807 ## s.e. -0.3246 sma1 ARIMA (0, 0, 0) × (0, 1, 1) 12 : ## ## Coefficients: ## ## ARIMA(0,0,0)(0,1,1)[12] ## Series: wineind seasonal= list (order= c (0,1,1), period=12))) (m2 = forecast:: Arima (wineind, order= c (0,0,0), 11 (1 − 𝑀 12 )𝑧 𝑢 = 𝜀 + (1 + Θ 1 𝑀 12 )𝑥 𝑢 𝑧 𝑢 − 𝑧 𝑢−12 = 𝜀 + 𝑥 𝑢 + Θ 1 𝑥 𝑢−12 𝑧 𝑢 = 𝜀 + 𝑧 𝑢−12 + 𝑥 𝑢 + Θ 1 𝑥 𝑢−12

  13. Fitted model 12 Model 2 − forecast::Arima (0,0,0) x (0,1,1)[12] [RMSE: 2470.2] 40000 30000 sales wineind model 20000 1980 1985 1990 1995 time

  14. Residuals 13 m2$residuals 5000 0 −5000 −10000 1980 1985 1990 1995 0.2 0.2 0.1 0.1 PACF ACF 0.0 0.0 −0.1 −0.1 12 24 36 12 24 36 Lag Lag

  15. Model 3 0.0755 sma1 ## 0.1402 0.0806 0.3040 -0.5790 ## s.e. 0.0813 ar2 0.0823 0.1023 ## ## sigma^2 estimated as 5948935: log likelihood=-1512.38 ## AIC=3034.77 AICc=3035.15 BIC=3050.27 ar3 ar1 ARIMA (3, 0, 0) × (0, 1, 1) 12 𝑗=1 3 ∑ 𝑗=1 3 ## ∑ (m3 = forecast:: Arima (wineind, order= c (3,0,0), seasonal= list (order= c (0,1,1), period=12))) ## Series: wineind ## ARIMA(3,0,0)(0,1,1)[12] ## ## Coefficients: 14 (1 − 𝜚 1 𝑀 − 𝜚 2 𝑀 2 − 𝜚 3 𝑀 3 ) (1 − 𝑀 12 )𝑧 𝑢 = 𝜀 + (1 + Θ 1 𝑀)𝑥 𝑢 (1 − 𝜚 1 𝑀 − 𝜚 2 𝑀 2 − 𝜚 3 𝑀 3 ) (𝑧 𝑢 − 𝑧 𝑢−12 ) = 𝜀 + 𝑥 𝑢 + 𝑥 𝑢−12 𝑧 𝑢 = 𝜀 + 𝜚 𝑗 𝑧 𝑢−1 + 𝑧 𝑢−12 − 𝜚 𝑗 𝑧 𝑢−12−𝑗 + 𝑥 𝑢 + 𝑥 𝑢−12

  16. Fitted model 15 Model 3 − forecast::Arima (3,0,0) x (0,1,1)[12] [RMSE: 2325.54] 40000 30000 sales wineind model 20000 1980 1985 1990 1995 time

  17. Model - Residuals 16 m3$residuals 5000 0 −5000 1980 1985 1990 1995 0.2 0.2 0.1 0.1 PACF ACF 0.0 0.0 −0.1 −0.1 12 24 36 12 24 36 Lag Lag

  18. prodn from the astsa package Monthly Federal Reserve Board Production Index (1948-1978) 17 data (prodn, package=”astsa”); forecast:: ggtsdisplay (prodn, points = FALSE) prodn 150 120 90 60 1950 1955 1960 1965 1970 1975 1980 0.8 0.8 PACF ACF 0.4 0.4 0.0 0.0 12 24 36 12 24 36 Lag Lag

  19. Differencing Based on the ACF it seems like standard differencing may be required 18 diff(prodn) 5 0 −5 −10 1950 1955 1960 1965 1970 1975 1980 0.6 0.6 PACF ACF 0.3 0.3 0.0 0.0 −0.3 −0.3 12 24 36 12 24 36 Lag Lag

  20. Differencing + Seasonal Differencing (fr_m2 = forecast:: Arima (prodn, order = c (0,1,0), BIC=1356.46 AICc=1352.59 ## AIC=1352.58 log likelihood=-675.29 ## sigma^2 estimated as 2.52: ## ## ARIMA(0,1,0)(0,1,0)[12] ## Series: prodn seasonal = list (order= c (0,1,0), period=12))) BIC=1788.43 Additional seasonal differencing also seems warranted AICc=1784.52 ## AIC=1784.51 log likelihood=-891.26 ## sigma^2 estimated as 7.147: ## ## ARIMA(0,1,0) ## Series: prodn seasonal = list (order= c (0,0,0), period=12))) (fr_m1 = forecast:: Arima (prodn, order = c (0,1,0), 19

  21. Residuals 20 fr_m2$residuals 4 0 −4 −8 1950 1955 1960 1965 1970 1975 1980 0.2 0.2 PACF ACF 0.0 0.0 −0.2 −0.2 −0.4 −0.4 12 24 36 12 24 36 Lag Lag

  22. Adding Seasonal MA 0.0520 ## ## Coefficients: ## sma1 sma2 ## -0.7624 ## s.e. ## Series: prodn 0.0689 0.0666 ## ## sigma^2 estimated as 1.615: log likelihood=-598.98 ## AIC=1203.96 AICc=1204.02 BIC=1215.61 ## ARIMA(0,1,0)(0,1,2)[12] seasonal = list (order= c (0,1,2), period=12))) (fr_m3.1 = forecast:: Arima (prodn, order = c (0,1,0), ## seasonal = list (order= c (0,1,1), period=12))) ## Series: prodn ## ARIMA(0,1,0)(0,1,1)[12] ## ## Coefficients: ## sma1 -0.7151 (fr_m3.2 = forecast:: Arima (prodn, order = c (0,1,0), ## s.e. 0.0317 ## ## sigma^2 estimated as 1.616: log likelihood=-599.29 ## AIC=1202.57 AICc=1202.61 BIC=1210.34 21

  23. Adding Seasonal MA (cont.) 0.2624 BIC=1198.69 AICc=1183.27 ## AIC=1183.15 log likelihood=-587.58 ## sigma^2 estimated as 1.506: ## 0.0529 0.0644 0.0529 ## s.e. -0.1205 (fr_m3.3 = forecast:: Arima (prodn, order = c (0,1,0), -0.7853 ## sma3 sma2 sma1 ## ## Coefficients: ## ## ARIMA(0,1,0)(0,1,3)[12] ## Series: prodn seasonal = list (order= c (0,1,3), period=12))) 22

  24. Residuals - Model 3.3 23 fr_m3.3$residuals 5.0 2.5 0.0 −2.5 −5.0 −7.5 1950 1955 1960 1965 1970 1975 1980 0.2 0.2 PACF ACF 0.0 0.0 −0.2 −0.2 12 24 36 12 24 36 Lag Lag

  25. Adding AR -0.1445 ## ## Coefficients: ## ar1 ar2 sma1 sma2 sma3 ## 0.3038 0.1077 -0.7393 0.2815 ## Series: prodn ## s.e. 0.0526 0.0538 0.0539 0.0653 0.0526 ## ## sigma^2 estimated as 1.331: log likelihood=-563.98 ## AIC=1139.97 AICc=1140.2 BIC=1163.26 ## ARIMA(2,1,0)(0,1,3)[12] seasonal = list (order= c (0,1,3), period=12))) (fr_m4.1 = forecast:: Arima (prodn, order = c (1,1,0), -0.7619 seasonal = list (order= c (0,1,3), period=12))) ## Series: prodn ## ARIMA(1,1,0)(0,1,3)[12] ## ## Coefficients: ## ar1 sma1 sma2 sma3 ## 0.3393 -0.1222 (fr_m4.2 = forecast:: Arima (prodn, order = c (2,1,0), 0.2756 ## s.e. 0.0500 0.0527 0.0646 0.0525 ## ## sigma^2 estimated as 1.341: log likelihood=-565.98 ## AIC=1141.95 AICc=1142.12 BIC=1161.37 24

  26. Residuals - Model 4.1 25 fr_m4.1$residuals 3 0 −3 −6 1950 1955 1960 1965 1970 1975 1980 0.1 0.1 0.0 0.0 PACF ACF −0.1 −0.1 12 24 36 12 24 36 Lag Lag

  27. Residuals - Model 4.2 26 fr_m4.2$residuals 3 0 −3 −6 1950 1955 1960 1965 1970 1975 1980 0.1 0.1 0.0 0.0 PACF ACF −0.1 −0.1 12 24 36 12 24 36 Lag Lag

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend