config-i1 / smooth

The set of functions used for time series analysis and in forecasting.
89 stars 19 forks source link

ETS+ARIMA intended behaviour #189

Closed T-Flet closed 2 years ago

T-Flet commented 2 years ago

When fitting an ETS+ARIMA model, non-significant ARIMA terms can still be present in the selected model; is this intended behaviour (leaving the minimum amount of ARIMA even if it is not significant)? Example:

> auto.adam(AirPassengers, model = 'ZXZ', orders = list(ar = 2, i = 0, ma = 2, select = T)) %>% summary()

Model estimated using auto.adam() function: ETS(AAN)+ARIMA(1,0,0)
Response variable: AirPassengers
Distribution used in the estimation: Gamma
Loss function type: likelihood; Loss function value: 669.7197
Coefficients:
            Estimate Std. Error Lower 2.5% Upper 97.5%  
alpha         0.8888     0.2413     0.4116      1.0000 *
beta          0.0000     0.0343     0.0000      0.0677  
phi1[1]       0.4064     0.1934     0.0240      0.7884 *
level       111.4187    24.6730    62.6295    160.1676 *
trend         3.6055     1.3815     0.8736      6.3351 *
ARIMAState1 -11.6365    47.4183  -105.4029     82.0525  

Sample size: 144
Number of estimated parameters: 7
Number of degrees of freedom: 137
Information criteria:
     AIC     AICc      BIC     BICc 
1353.439 1354.263 1374.228 1376.274 
Warning message:
Observed Fisher Information is not positive semi-definite, which means that the likelihood was not maximised properly. Consider reestimating the model, tuning the optimiser or using bootstrap via bootstrap=TRUE. 

A warning of non-properly maximised likelihood is present, but conceptually it should not affect the question; connected to it though, the reapply function with the bootstrap argument mentioned in the book does not seem to be in the current smooth release (3.1.3, which, separately, is 0.0.1 ahead of the current GitHub one), and adding a bootstrap = T to the above call does not change its output.

config-i1 commented 2 years ago

Hi,

  1. Retaining the insignificant elements is the expected behaviour. They are not selected based on the significance, but rather based on information criteria. This means that the model without them has a higher AIC / AICc / ...
  2. reapply() is the new name of the refit() function, which will be introduced in the next release of smooth v3.1.4. You can install the development version of it via remotes::install_github("config-i1/smooth").
  3. The thing with Fisher Information appears because of the numerical optimisation. It is in my "To do" list, but I haven't managed to resolve it yet.
  4. It's a bit weird with bootstrap, the confidence intervals should be different. I'll investigate.
config-i1 commented 2 years ago

I've checked (4) on the recent version of smooth, v3.1.4.41003. It works as intended. The probable cause of the weird behaviour is the issue #188