# Seasonal model with auto.arima

I'm trying to fit a seasonal arima model with the following very simple timeseries which has also a linear trend:

time_series = ts(c(6, 18, 30, 80, 65, 40, 67, 47, 57, 82, 67, 82, 66, 78, 90, 140, 125, 100, 127, 107, 117, 142, 127, 142, 126, 138, 150, 200 ,185, 160, 187, 167 ,177, 202 ,187, 202, 186, 198, 210, 260 ,245 ,220, 247, 227 ,237, 262, 247, 262), frequency=12).

In order to catch the seasonality, I set the parameter D=1 in the auto.arima function.

The output model is:

ARIMA(0,0,0)(0,1,0)[12] with drift

Coefficients:
drift
60

sigma^2 estimated as 448046:  log likelihood=-284.8
AIC=571.6   AICc=571.72   BIC=573.19


So the forecast model should be y_t -y_{t-12} = drift and it should be right. But, when I do the forecast I obtain the following values:

       Point Forecast     Lo 80    Hi 80     Lo 95    Hi 95
Jan 5            906  48.17781 1763.822 -405.9258 2217.926
Feb 5            918  60.17781 1775.822 -393.9258 2229.926
Mar 5            930  72.17781 1787.822 -381.9258 2241.926
Apr 5            980 122.17781 1837.822 -331.9258 2291.926
May 5            965 107.17781 1822.822 -346.9258 2276.926
Jun 5            940  82.17781 1797.822 -371.9258 2251.926


which is too high:

It seems that the forecasting model is y_t -y_{t-12} = drift * 12 and it is wrong.

Could you give me some hints in order to understand what is happening? I am using the forecast package version 8.4 on R 3.5.1.

• This looks badly broken. I'll ping Rob Hyndman and ask him to take a look. – Stephan Kolassa Jul 12 '18 at 18:38
• In the meantime: I do not believe this should be closed as off-topic. I believe that this question is not purely about the forecast package, but will require some statistical understanding to answer. Please do not close. – Stephan Kolassa Jul 12 '18 at 18:39
• I agree with @StephenKolassa this requires statistical analysis and should not be closed. – forecaster Jul 12 '18 at 23:31

The problem here is that the model is "perfect" in that $y_t - y_{t-12}=60$ without error for all $t$. So an ARIMA model will have zero residuals. The stats::arima() function won't fit such a model without return an error. forecast::auto.arima() tries to be more helpful and returns the model with zero residuals. Unfortunately, there was a bug which occurred only when $y_t-y_{t-m}=c$ in which case the "estimated" constant was $cm$ rather than $c$. I've fixed it on github.