## 3 Model Identification  
As demonstrated in Sections 2.1 and 2.2, finding appropriate state space and ARIMA models for a time series is not an easy task. Both forecast methodologies are subjective and usually difficult to apply. In this research work, the challenge was to specify a procedure to identify an appropriate state space and an appropriate ARIMA model for a time series. The sample ACFs of seasonal time series typically decay very slowly at regular lags and at multiples of the seasonal period \(m\) and the sample PACFs have a large spike at lag 1 and cut off to zero after lag 2 or 3. This behaviour usually suggests seasonal differences and regular differences to achieve stationarity. Therefore, for each seasonal times series \((m>1)\), in the case of ARIMA, twelve types of data are considered: raw data \((d=D=0)\), first difference data \((d=1,D=0)\), second difference data \((d=2,D=0)\), seasonally difference data \((d=0,D=1)\), first and seasonally difference data \((d=D=1)\), second and seasonally difference data \((d=2,D=1)\), log-transformed data \((d=D=0)\), first difference log-transformed data \((d=1,D=0)\), second difference log-transformed data \((d=2,D=0)\), seasonally difference log-transformed data \((d=0,D=1)\), first and seasonally difference log-transformed data \((d=D=1)\), and second and seasonally difference log-transformed data \((d=2,D=1)\); higher orders of differencing are unlikely to make much interpretable sense and should be avoided [16]. In the case of ETS, two types of data are considered: raw data and log-transformed data. To be able to explore the forecasting capability of both modeling approaches, for each type of data, all possible ETS models (30 in total) and all ARIMA\((p,d,q)\times(P,D,Q)_{m}\) models, where \(p\) and \(q\) can take values from 0 to 5, and \(P\) and \(Q\) can take values from 0 to 2 (324 in total), should be fitted. If the time series is nonseasonal \((m=1)\), then, in the case of ARIMA, six types of data are considered (raw data and log-transformed data with regular differencing up to second order differences) and 36 models \((P=D=Q=0)\) are fitted to each type; in the case of ETS models, the two types of data are considered (raw data and log-transformed data) and 10 models (\"Seasonality\"\(=\) N) are fitted to each type. To evaluate the forecast accuracy of each model considered, forecasts on a test set should be obtained. For this, the data must be split into a training set and a test set. The size of the test set can be typically about 20%-30% of the data set, although it can be less due to the small size of the sample. In fact, short time series are very common, and, in the case of retail sales, this is usually the case since older data are frequently useless or non-existent due to the changes of consumer demands. To avoid limiting the available data by removing a significant part to the test set and to be able to make multiple rounds of forecasts to obtain more reliable forecast accuracy measures, since the test set is usually small, time series cross-validation instead of conventional validation is performed for the model selection [22]. This procedure is based on one-step forecasts and uses different training sets, each containing one more observation than the previous one. The value of RMSE for each model is calculated averaging the one-step forecasts obtained. The model which has the lowest RMSE value and passes the Ljung-Box test using all the available data with a significance level of 5% is selected among all the ARIMA and ETS models considered. RMSE is used for model selection since it is more sensitive than the other measures to large errors. If the selected model fails the Ljung-Box test, the model with the second lowest RMSE value on the forecasts of the test set is selected, and so on. It should be mentioned that when models are compared using Akaike's Information Criterion or Bayesian Information Criterion values, it is essential that all models have the same orders of differencing and the same transformation [16].