pure seasonal models
play

Pure Seasonal Models ARIMA Modeling with R Pure Seasonal Models O - PowerPoint PPT Presentation

ARIMA MODELING WITH R Pure Seasonal Models ARIMA Modeling with R Pure Seasonal Models O en collect data with a known seasonal component Air Passengers (1 cycle every S = 12 months) Johnson & Johnson Earnings (1 cycle every


  1. ARIMA MODELING WITH R Pure Seasonal Models

  2. ARIMA Modeling with R Pure Seasonal Models ● O � en collect data with a known seasonal component ● Air Passengers (1 cycle every S = 12 months) ● Johnson & Johnson Earnings (1 cycle every S = 4 quarters)

  3. ARIMA Modeling with R Pure Seasonal Models ● Consider pure seasonal models such as an SAR( P = 1) s = 12 X t = Φ X t − 12 + W t

  4. ARIMA Modeling with R ACF and PACF of Pure Seasonal Models SAR(P) s SMA(Q) s SARMA(P, Q) s ACF* Tails o ff Cuts o ff lag QS Tails o ff PACF* Cuts o ff lag PS Tails o ff Tails o ff * The values at the nonseasonal lags are zero SAR(1) 1 SMA(1) 1

  5. ARIMA MODELING WITH R Let’s practice!

  6. ARIMA MODELING WITH R Mixed Seasonal Models

  7. ARIMA Modeling with R Mixed Seasonal Model ● Mixed model: SARIMA(p, d, q) x (P, D, Q) s model ● Consider a SARIMA(0, 0, 1) x (1, 0, 0) 12 model X t = Φ X t − 12 + W t + θ W t − 1 ● SAR(1): Value this month is related to 
 X t − 12 last year’s value ● MA(1): This month’s value related to last 
 W t − 1 month’s shock

  8. ARIMA Modeling with R ACF and PACF of SARIMA(0,0,1) x (1,0,0) s=12 ● The ACF and PACF for this mixed model: X t = . 8 X t − 12 + W t − . 5 W t − 1 Seasonal Non-seasonal

  9. ARIMA Modeling with R Seasonal Persistence Hawaiian Quarterly Occupancy Rate 85 3 1 1 3 1 3 1 80 1 1 1 3 3 1 3 3 2 2 4 2 3 1 3 4 1 Quarterly Occupancy Rate: 
 3 2 75 3 4 4 1 4 2 x 2 2 4 3 4 2 4 4 1 % rooms filled 4 3 1 70 4 2 2 2 3 2 4 2 1 65 4 2 4 2002 2004 2006 2008 2010 2012 2014 2016 Time Seasonal Component Seasonal Component 1 1 4 1 1 3 1 1 1 3 3 1 1 3 3 3 1 3 1 1 Seasonal Component: 
 1 3 1 3 3 2 3 3 3 3 this year vs. last year Qx 0 Q1 ≈ Q1, Q2 ≈ Q2, 
 2 -2 2 2 2 2 2 2 2 2 2 4 4 2 2 4 4 4 4 4 4 4 2 4 2 Q3 ≈ Q3, Q4 ≈ Q4 -4 4 4 4 4 2002 2004 2006 2008 2010 2012 2014 2016 Time Seasonal Difference 2 3 4 1 1 2 Remove seasonal persistence 5 3 4 3 1 2 3 4 1 2 2 4 1 4 3 4 1 2 1 4 4 2 3 1 3 diff(x, 4) 3 4 1 2 3 by a seasonal di ff erence: 
 0 1 2 4 2 1 4 3 4 2 3 3 X t - X t-4 or D = 1, S = 4 -5 2 1 2 3 4 for quarterly data -10 1 2004 2006 2008 2010 2012 2014 2016 Time

  10. ARIMA Modeling with R Air Passengers ● Monthly totals of international airline passengers, 1949-1960 x: AirPassengers lx: log(x) dlx: diff(lx) ddlx: diff(dlx, 12)

  11. ARIMA Modeling with R Air Passengers: ACF and PACF of ddlx ● Seasonal: ACF cu � ing o ff at lag 1s (s = 12); PACF tailing o ff at lags 1s, 2s, 3s… ● Non-Seasonal: ACF and PACF both tailing o ff

  12. ARIMA Modeling with R Air Passengers > airpass_fit1 <- sarima(log(AirPassengers), p = 1, d = 1, q = 1, P = 0, D = 1, Q = 1, S = 12) > airpass_fit1$ttable Estimate SE t.value p.value ar1 0.1960 0.2475 0.7921 0.4296 ma1 -0.5784 0.2132 -2.7127 0.0075 sma1 -0.5643 0.0747 -7.5544 0.0000 > airpass_fit2 <- sarima(log(AirPassengers), 0, 1, 1, 0, 1, 1, 12) > airpass_fit2$ttable Estimate SE t.value p.value ma1 -0.4018 0.0896 -4.4825 0 sma1 -0.5569 0.0731 -7.6190 0

  13. ARIMA Modeling with R Air Passengers Model: (0,1,1) (0,1,1) [12] Standardized Residuals 3 2 1 − 1 − 3 1950 1952 1954 1956 1958 1960 Time ACF of Residuals Normal Q − Q Plot of Std Residuals 3 ● ● 0.4 Sample Quantiles ● ● 2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 1 ● ●● ● ● ● ● ● ● ● ● ● 0.2 ● ● ● ● ● ● ● ● ● ● ● ● ● ACF ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● − 1 ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● − 0.2 ● − 3 ● 0.5 1.0 1.5 − 2 − 1 0 1 2 LAG Theoretical Quantiles p values for Ljung − Box statistic 0.8 ● ● p value ● ● ● ● ● ● ● ● ● ● 0.4 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.0 5 10 15 20 25 30 35 lag

  14. ARIMA MODELING WITH R Let’s practice!

  15. ARIMA MODELING WITH R Forecasting Seasonal ARIMA

  16. ARIMA Modeling with R Forecasting ARIMA Processes ● Once model is chosen, forecasting is easy because the model describes how the dynamics of the time series behave over time ● Simply continue the model dynamics into the future ● In the astsa package, use sarima.for() for forecasting

  17. ARIMA Modeling with R Forecasting Air Passengers ● In the previous video, we decided that a SARIMA(0,1,1)x(0,1,1) 12 model was appropriate > sarima.for(log(AirPassengers), n.ahead = 24, 0, 1, 1, 0, 1, 1, 12) 6.5 log(AirPassengers) 6.0 5.5 1954 1956 1958 1960 1962 Time

  18. ARIMA MODELING WITH R Let’s practice!

  19. ARIMA MODELING WITH R Congratulations!

  20. ARIMA Modeling with R What you’ve learned ● How to identify an ARMA model from data looking at ACF and PACF ● How to use integrated ARMA (ARIMA) models for nonstationary time series ● How to cope with seasonality

  21. ARIMA Modeling with R Don’t stop here! ● astsa- package ● Other DataCamp courses in Time Series Analysis

  22. ARIMA MODELING WITH R Thank you!

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