I hate to ask this question but I am going insane and other links haven't solved this problem. I have a seasonal ARIMA with just over two years of weekly data ARIMA(0,1,1)(0,1,1). It's highly seasonal and this model fits well enough for initial forecasting. I'm using Rob Hyndman's
forecast package and the
forecast functions within it. However, I am providing the forecasts and the forecasting equation to a client. So far, so good.
However, when I write out the forecasting equation I get numbers close but not equal to the forecast. I have double-checked my equation (here) and cannot figure out what I'm doing wrong. Here are the numbers:
Y_20_49 <- 791.7044 # One period back Y_19_50 <- 516.0694 # One year ago Y_19_49 <- 812.9433 # One year and one period ago # Residuals acquired with sweep::augment(); # same as residuals(model) resid_20_49 <- 1.048402e+01 # Residual one period ago resid_19_50 <- -1.865834e+02 # Residual one year ago resid_19_49 <- 2.784324e+01 # Residual one year and a period ago. ma1 <- -0.8761 # MA1 coefficient from ARIMA sma1 <- 1 # SMA1 coef from ARIMA # Manual = 274.6686 Manual <- Y_20_49 + Y_19_50 - Y_19_49 + ma1 * resid_20_49 + sma1 * resid_19_50 + (ma1 * sma1) * resid_19_49 Actual <- 334.4015 # Result from forecast(h = 1)
There's something obvious I'm missing but I'd appreciate any help. This model is not transformed but I have the same problem with another similar model that is logged.
UPDATE2: The manual calculations seem to work when the MA and SMA terms are not close to one (even around abs(0.88) seems OK). I cannot be certain if this is the case but this happened during my quest to reproduce the forecasts.