I am analyzing this data.
Here is my code
library(fpp)
library(urca)
setwd("C:/Users/kuco/Desktop") #where is the file folder
dt<-read.csv("test.csv",header = FALSE) #read the file
t<-ts(dt,start = c(1997,1),frequency = 12) #put it into time series data
fit1<-auto.arima(t,stepwise = F,approximation = FALSE,ic="aic",D=1) #find the best model
fit1 #show the best model
fit2<-arima(t,order=c(1,1,2),seasonal = list(order=c(1,1,1)))
fit2
But it turns out that the arima(1,1,2)(1,1,12)[12]
is better than the model from auto.arima()
. So what can I do to get the lowest AIC model?
auto.arima
, you will see that AIC is used within a fixed order of integration, but not across them. The order of integration (seasonal and simple) is determined by tests (OCSB and KPSS, respectively). $\endgroup$