I am trying to fit a time series with function auto.arima
in the "forecast" package in R that is choosing the best model automatically. Since I am using it for my thesis, I have to show the trace of stepwise selection algorithm manually (without adding line "trace" in auto.arima
code) with my web apps here https://nugraha92.shinyapps.io/Analisis/
But, when I manually checked it, I found that auto.arima
did not choose minimum AIC values.
Then, I input the trace=TRUE
line and the result shows that the AIC/BIC value is not the same between the "trace ARIMA list" and "choosen ARIMA model". For example, in the image it is shown that the best model is ARIMA(3,1,3), BIC score at the list is -252.4451 while at the equation below is -250.89.
Why and which one is the correct one? Did I make some mistakes?
Best Answer
auto.arima
uses an approximation to speed up calculations. The final reported AIC/AICc/BIC values are computed without the approximation. Setapproximation=FALSE
if you want to avoid using the approximation. Then the values produced bytrace=TRUE
will match the final values reported.