This book is in Open Review. I want your feedback to make the book better for you and other readers. To add your annotation, select some text and then click the on the pop-up menu. To see the annotations of others, click the button in the upper right hand corner of the page

## 9.5 Examples of application

Building upon the example with AirPassengers data from Section 8.5.2, we will construct several multiplicative ARIMA models and see, which one of them is the most appropriate for the data. As a reminder, the best additive ARIMA model was SARIMA(0,2,2)(0,2,2)$$_{12}$$, which had AICc of 1028.828. We will do something similar here, but using Log Normal distribution, thus working with logARIMA. In order to understand what model can be used in this case, we can take logarithm of data and see what happens with the components of time series:

plot(log(AirPassengers)) We still have the trend in the data and the seasonality now corresponds to the additive one rather than the multiplicative (as expected). While we might still need the second differences for the non-seasonal part of the model, taking first differences for the seasonal should suffice, because the logarithmic transform will take care of the expanding seasonal pattern in the data. So we can test several models with different options for ARIMA orders:

adamModelLogSARIMA <- vector("list",3)
# logSARIMA(0,1,1)(0,1,1)
orders=list(ar=c(0,0), i=c(1,1), ma=c(1,1)),
h=12, holdout=TRUE, distribution="dlnorm")
# logSARIMA(0,2,2)(0,1,1)
orders=list(ar=c(0,0), i=c(2,1), ma=c(2,2)),
h=12, holdout=TRUE, distribution="dlnorm")
# logSARIMA(1,1,2)(0,1,1)
orders=list(ar=c(1,0), i=c(1,1), ma=c(2,1)),
h=12, holdout=TRUE, distribution="dlnorm")
"logSARIMA(0,2,2)(0,1,1)",
"logSARIMA(1,1,2)(0,1,1)")

The thing that is different between the models is the non-seasonal part. Using the connection with ETS (discussed in Section 8.4), the first model should work on local level data, the second should be optimal for the local trend series and the third one is placed somewhere in between the two. We can compare the models using AICc:

sapply(adamModelLogSARIMA, AICc)
## logSARIMA(0,1,1)(0,1,1) logSARIMA(0,2,2)(0,1,1)
##                    982.5764                   1096.8616
## logSARIMA(1,1,2)(0,1,1)
##                    993.0431

It looks like the logSARIMA(0,1,1)(0,1,1)$$_{12}$$ is more appropriate for the data. In order to make sure that we did not miss anything, we analyse the residuals of this model (Figure 9.1):

par(mfcol=c(2,1), mar=c(2,2,2,1))
plot(adamModelLogSARIMA[],10:11) Figure 9.1: ACF and PACF of logSARIMA(0,1,1)(0,1,1)$$_{12}$$.

We can see that there are no significant coefficient on either ACF or PACF, so there is nothing else to improve in this model. We can then produce forecast from the model and see how it performed on the holdout sample (Figure 9.2):

plot(forecast(adamModelLogSARIMA[],h=12,interval="prediction")) Figure 9.2: Forecast from logSARIMA(0,1,1)(0,1,1)$$_{12}$$.

The ETS model closest to the logSARIMA(0,1,1)(0,1,1)$$_{12}$$ would probably be ETS(M,M,M), because the former has both seasonal and non-seasonal differences (see discussion in Subsection 8.4.4):

adamModelETS <- adam(AirPassengers, "MMM", h=12, holdout=TRUE)
adamModelETS
## Time elapsed: 0.13 seconds
## Model estimated using adam() function: ETS(MMM)
## Distribution assumed in the model: Gamma
## Loss function type: likelihood; Loss function value: 468.5176
## Persistence vector g:
##  alpha   beta  gamma
## 0.7684 0.0206 0.0000
##
## Sample size: 132
## Number of estimated parameters: 17
## Number of degrees of freedom: 115
## Information criteria:
##       AIC      AICc       BIC      BICc
##  971.0351  976.4036 1020.0428 1033.1492
##
## Forecast errors:
## ME: -5.617; MAE: 15.496; RMSE: 21.938
## sCE: -25.677%; Asymmetry: -23.1%; sMAE: 5.903%; sMSE: 0.698%
## MASE: 0.643; RMSSE: 0.7; rMAE: 0.204; rRMSE: 0.213

Comparing information criteria, ETS(M,M,M) should be preferred to logARIMA, but in terms of accuracy on the holdout, logARIMA is more accurate than ETS on this data:

adamModelLogSARIMA[]
## Time elapsed: 0.3 seconds
## Model estimated using adam() function: SARIMA(0,1,1)(0,1,1)
## Distribution assumed in the model: Log Normal
## Loss function type: likelihood; Loss function value: 472.923
## ARMA parameters of the model:
## MA:
##  theta1 theta1
##    -0.2785    -0.5530
##
## Sample size: 132
## Number of estimated parameters: 16
## Number of degrees of freedom: 116
## Information criteria:
##       AIC      AICc       BIC      BICc
##  977.8460  982.5764 1023.9708 1035.5197
##
## Forecast errors:
## ME: -12.968; MAE: 13.971; RMSE: 19.143
## sCE: -59.285%; Asymmetry: -91.7%; sMAE: 5.322%; sMSE: 0.532%
## MASE: 0.58; RMSSE: 0.611; rMAE: 0.184; rRMSE: 0.186