Skip to content

how to check convergence of arima model

7 messages · Rui Barradas, R. Michael Weylandt, Sajeeka Nanayakkara +1 more

#
Hello,

Inline.

Em 04-07-2012 09:35, Sajeeka Nanayakkara escreveu:
No, arima() does not select models by AIC. That is the default behavior 
of ar(); arima() does NOT select models, it selects, using optim, values 
for the parameters of a specified model. You must choose the orders 
yourself.

Hope this helps,

Rui Barradas
#
Hello,

Put the fitted models in a list and then use lapply with AIC(). Like this


set.seed(1)
x <- 1:100 + sqrt(1:100 + runif(100)) + rnorm(100)
models <- list()
models[[1]] <- arima(diff(x), order = c(1, 0, 0))  # Just to show
models[[2]] <- arima(diff(x), order = c(1, 0, 1))  # several
models[[3]] <- arima(diff(x), order = c(2, 0, 2))  # models
models[[4]] <- arima(diff(x), order = c(2, 0, 3))
lapply(models, AIC)


Or run each model at a time through AIC(), whichever suits better.

Hope this helps

Rui Barradas

Em 04-07-2012 10:22, Sajeeka Nanayakkara escreveu:
#
Also look at auto.arima in the forecast package. 

Michael
On Jul 4, 2012, at 4:38 AM, Rui Barradas <ruipbarradas at sapo.pt> wrote: