Open TimothyHyndman opened 4 years ago
@robjhyndman
This is coming from here (which comes from forecast::auto.arima()
)
https://github.com/tidyverts/fable/blob/64b36c6df3285e33c912991a1cc885604bbb3158/R/arima.R#L153
Any reason why npar
is the number of estimated coefficients +1
?
Also @TimothyHyndman, when you say "Refit ARIMA with two more observations", you're refitting the model with only two observations (not two more observations). You'll need to refit the model with the historical data and the next two observations (or use stream.ARIMA once #251 is done).
npar = # coefficients + 1 to account for the residual variance. This is how the AIC/AICc/BIC defines # parameters in a model.
Got it, thanks. https://github.com/tidyverts/fable/blob/64b36c6df3285e33c912991a1cc885604bbb3158/R/arima.R#L159
Then in this case (n=2
, d=0
, D=0
), nstar = 2
giving division by (nstar - npar - 1) = 0
. Is this correct?
It is problematic computing AICc on a refit because the parameters were not estimated on that data set. If the data was used for estimation, then the equation is correct. But you would expect nstar to always be bigger than npar+1 or you would be over-fitting.
I'm not sure what we should return as AICc value on a refit -- possibly the original AICc on the original data, or perhaps NA or NULL.
Also @TimothyHyndman, when you say "Refit ARIMA with two more observations", you're refitting the model with only two observations (not two more observations). You'll need to refit the model with the historical data and the next two observations (or use stream.ARIMA once #251 is done).
Ah, I was thinking that refit used the data contained in fit
in addition to the data passed in with new_data =
. Thanks for the correction.
Using the latest github version of fable here (but issue is also present on CRAN version).
Created on 2020-05-18 by the reprex package (v0.3.0)