A time series of yearly data, I want to compare the AIC and BIC values by auto.arima and manual ARIMA.
library(forecast)
drink <- c(188,301,451,504,630,855,883,1078,1099,1008,1050,1058)
drink_ts <- ts(drink, frequency = 1, start=c(1950))
auto.arima(drink_ts)
# Series: drink_ts
# ARIMA(0,1,0) with drift
# Coefficients:
# drift
# 79.0909
# s.e. 26.5245
# sigma^2 estimated as 8513: log likelihood=-64.86
# AIC=133.71 AICc=135.21 BIC=134.51
I want to replicate it, so do a manual with same ARIMA(0,1,0):
drink.fit <- arima(drink_ts, order = c(0,1,0))
drink.fit
To get the AIC and BIC values:
AIC(drink.fit)
BIC = AIC(drink.fit,k = log(length(drink_ts)))
BIC
# AIC: 138.7121
# BIC: 138.2272
The AIC and BIC values by auto.arima and manual ARIMA are slightly different.
Does it matter? Am I missing anything in the manual ARIMA?
(by the way, if there’s a direct way to get the AIC and BIC from the manual ARIMA)
Thank you.