Is this a bug in auto ARIMA or Am I doing something?

Is this a bug in auto ARIMA or Am I doing something?

@Aaron, your timeseries data is discontinous. auto.arima as many other forecast methods in R requires equally spaced time series. The problem is your time series is not equally spaced, meaning there are gaps in the dates. The following code converts the time series into a vector, and now the auto.arima works fine.

Can you force a seasonal model in auto.arima?

It’s quite possible that this test simply got it wrong in this instance; it’s a statistical test, after all. You can force a seasonal model by setting D=1, although auto.arima () runs for quite some time with forced seasonality. (Note that the information criteria are not comparable between the original and the differenced series.)

How is ARMA ( 2, 1 ) structure found by auto.arima?

The ARMA (2,1) structure is found by auto.arima ‘s minimizing the AICc for the model with 4 harmonics on differenced observations, & has the lowest AICc overall. Summarizing the root mean square errors shows that both the harmonic models perform better on the test set, with little to choose between them:

Can you allow non-integer frequencies in auto Arima?

(This also makes it easy to allow for non-integer frequencies—as @RichardHardy ponts out might be appropriate in this case (if the extra day or two each year weren’t simply dropped).) Your model will then have deterministic, but smoothed, seasonal effects, & you can still allow ARIMA errors:

When to forecast out of sample in Arima?

Second, if you are using covariates in your arima model then you will need to provide them when you forecast out-of-sample. This may mean forecasting each of the covariates before generating forecasts for your variable of interest. In the example below I split the data into two samples for simplicity.

Is there a multicollinearity in auto Arima?

There is no multicollinearity, in fact intercorrelation table shows all the correlations <0.1, because I’ve already extracted the independent factors by doing principal component analysis.

When to use covariates in an ARIMA model?

A few points. One, you can just convert the entire matrix to a ts object and then isolate the variables later. Second, if you are using covariates in your arima model then you will need to provide them when you forecast out-of-sample. This may mean forecasting each of the covariates before generating forecasts for your variable of interest.