06217316 for ARIMA We fit the model run checkresiduals and use the model for

06217316 for arima we fit the model run

This preview shows page 43 - 52 out of 66 pages.

We note that even though AICc gave lowest values for the model with drift, RMSE was the least at 0.06217316 for ARIMA . We fit the model, run checkresiduals() and use the model for the forecast. fit <- Arima (h02, order= c ( 3 , 0 , 1 ), seasonal= c ( 0 , 1 , 2 ), lambda= 0 )
Image of page 43
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66) checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66) 44/66 checkresiduals (fit) ## ## Ljung-Box test ## ## data: Residuals from ARIMA(3,0,1)(0,1,2)[12] ## Q* = 23.663, df = 18, p-value = 0.1664 ## ## Model df: 6. Total lags used: 24
Image of page 44
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66) checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66) 45/66 autoplot ( forecast (fit), ylab= "h02 sales (million scripts)" , xlab= "Year" )
Image of page 45
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66) checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66) 46/66 ARIMA vs ETS It is a common myth that ARIMA models are more general than exponential smoothing. While linear exponential smoothing models are all special cases of ARIMA models, the non-linear exponential smoothing models have no equivalent ARIMA counterparts. There are also many ARIMA models that have no exponential smoothing counterparts. In particular, every ETS model is non-stationary, while ARIMA models must be stationary. The ETS models with seasonality and non-damped trend have two unit roots (i.e., they need two levels of differencing to make them stationary). All other ETS models have one unit root (they need one level of differencing to make them stationary) – please refer to the table in the next slide.
Image of page 46
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66) checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66) 47/66 Equivalence relationships of some of the ETS and ARIMA models
Image of page 47
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66) checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66) 48/66 The AICc is useful for selecting between models in the same class. For example, we can use it to select an ARIMA model between candidate ARIMA models or an ETS model between candidate ETS models. However, it cannot be used to compare between ETS and ARIMA models because they are in different model classes, and the likelihood is computed in different ways. The examples below demonstrate selecting between these classes of models.
Image of page 48
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66)checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66)49/66Example: Comparing auto.arima() and ets() on non-seasonal dataWe can use time series cross-validation to compare an ARIMA model and an ETS model. The code below providesfunctions that return forecast objects from auto.arima() and ets() respectively. An example would be as follows:fets <- function(x, h) { forecast(ets(x), h = } farima <- function(x, h) { forecast(auto.arima(x), h=h) }The returned objects can then be passed into tsCV h)
Image of page 49
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66) checked-new2nd ed/8_ARIMA_models_Pt2_2020.html#(66) 50/66 Using ausair data air <- window (ausair, start= 1990 ) fets <- function (air, h) { forecast ( ets (air), h = h) } farima <- function (air, h) { forecast ( auto.arima (air), h= h) }
Image of page 50
3/31/2020 Lec 10: Seasonal ARIMA (Chapter 8) and Combination Forecast (Section 12.4) (66)
Image of page 51
Image of page 52

You've reached the end of your free preview.

Want to read all 66 pages?

  • Spring '20
  • Autoregressive moving average model, Autoregressive integrated moving average, AICC, RMSE

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture