# Different AIC values in trace and final output in auto.arima

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?

• But, when I manually checked it, I found that auto.arima did not choose minimum AIC values. Well, you have specified BIC to be the criterion of choice: ic="bic". AIC is not the same as BIC and the choice by the two need not coincide. – Richard Hardy Jun 26 '16 at 10:08

auto.arima uses an approximation to speed up calculations. The final reported AIC/AICc/BIC values are computed without the approximation. Set approximation=FALSE if you want to avoid using the approximation. Then the values produced by trace=TRUE will match the final values reported.