5.4 Candidate model set
Once you have explored a variety of forecasting models you can come up with a candidate set of models along with a set of null models.
Here is our candidate models for the anchovy along with the code to fit and create a forecast from each model.
- Exponential smoothing model with trend
fit <- forecast::ets(traindat, model="AAN")
fr <- forecast::forecast(fit, h=1)
- Exponential smoothing model no trend
fit <- forecast::ets(traindat, model="ANN")
fr <- forecast::forecast(fit, h=1)
- ARIMA(0,1,1) with drift (best)
fit <- forecast::Arima(traindat, order(0,1,1), include.drift=TRUE)
fr <- forecast::forecast(fit, h=1)
- ARIMA(2,1,0) with drift (within 2 AIC of best)
fit <- forecast::Arima(traindat, order(2,1,0), include.drift=TRUE)
fr <- forecast::forecast(fit, h=1)
- Time-varying regression with linear time
traindat$t <- 1:24
fit <- lm(log.metric.tons ~ t, data=traindat)
fr <- forecast::forecast(fit, newdata=data.frame(t=25))
We also need to include null models in our candidate set.
Null models
- Naive no trend
fit <- forecast::Arima(traindat, order(0,1,0))
fr <- forecast::forecast(fit, h=1)
# or simply
fr <- forecast::rwf(traindat, h=1)
- Naive with trend
fit <- forecast::Arima(traindat, order(0,1,0), include.drift=TRUE)
fr <- forecast::forecast(fit, h=1)
# or simply
fr <- forecast::rwf(traindat, drift=TRUE, h=1)
- Average or mean
fit <- forecast::Arima(traindat, order(0,0,0))
fr <- forecast::forecast(fit, h=1)