get the parameters when using auto.arima

1

How to get the parameters when using auto.arima package in R?

ie: somehow call ARIMA4 and give me a string argument of this style:   ARIMA (2,1,0) (2,0,0) [12]

A manual way to check it is:

 train<-ts(data,start=c(2010,1),frequency=365)
    ARIMA4<-auto.arima(train)

    # llamada a Arima4
        > ARIMA4

        Series: train    
 ARIMA(2,1,0)(2,0,0)[12]                    

    Coefficients:
              ar1      ar2    sar1    sar2
          -0.6493  -0.3009  0.3995  0.3388
    s.e.   0.0864   0.0846  0.0885  0.0938

    sigma^2 estimated as 453046:  log likelihood=-1057.19
    AIC=2124.39   AICc=2124.86   BIC=2138.84

Hypothesis, I would like to save in a variable (logical or not) the parameters of arima.

>parametros
ARIMA(2,1,0)(2,0,0)[12]
    
asked by PeCaDe 22.08.2016 в 14:37
source

1 answer

1

found solution:

adding to the model: "$ arma"

ARIMA4$arma 
>[1] 2 0 2 0 12 1 0 

A "better format":

paste("arima",list(ARIMA4$arma)) 
>"arima c(2, 0, 2, 0, 12, 1, 0)" 

There may be a better solution for a more elegant format.

    
answered by 23.08.2016 / 10:56
source