5.9 ARIMA Models
ARIMA models are the same as ARMA models but the i
stands for ‘integrated’ which refers to differencing. If you were differencing to remove the trend and seasonality, you could incorporate that difference in the model fitting procedure (like we did with the parametric modeling and xreg=
).
Below, we show fitting the model on the ORIGINAL data, before removing the trend or seasonality. Then we do a first difference to remove the trend and a first order difference of lag 12 to remove the seasonality.
The little \(d\) indicates the order of differences for lag 1 and the big \(D\) indicates the order of seasonal differences and \(S\) gives the lag for the seasonal differences. Once we know the type of differencing that we need to do, we incorporate the differencing into the model fitting, which will give us more accurate predictions for the future.
<- sarima(birth, p = 0, d = 1, q = 1, D = 1, S = 12) #this model includes lag 1 differencing and lag 12 differencing mod.fit4
## initial value 2.219164
## iter 2 value 2.153449
## iter 3 value 2.136898
## iter 4 value 2.136061
## iter 5 value 2.135851
## iter 6 value 2.135848
## iter 6 value 2.135848
## iter 6 value 2.135848
## final value 2.135848
## converged
## initial value 2.136141
## iter 2 value 2.136138
## iter 2 value 2.136138
## iter 2 value 2.136138
## final value 2.136138
## converged
mod.fit4
## $fit
##
## Call:
## arima(x = xdata, order = c(p, d, q), seasonal = list(order = c(P, D, Q), period = S),
## include.mean = !no.constant, transform.pars = trans, fixed = fixed, optim.control = list(trace = trc,
## REPORT = 1, reltol = tol))
##
## Coefficients:
## ma1
## -0.522
## s.e. 0.055
##
## sigma^2 estimated as 71.6: log likelihood = -1280, aic = 2564
##
## $degrees_of_freedom
## [1] 359
##
## $ttable
## Estimate SE t.value p.value
## ma1 -0.522 0.0547 -9.54 0
##
## $AIC
## [1] 7.12
##
## $AICc
## [1] 7.12
##
## $BIC
## [1] 7.14
Notice, this model with differencing isn’t any better than the ARMA model with the spline trend and indicator variables for month.