简体   繁体   中英

AR(2) model in R software

can a AR(2) model be written with code:

result.ar1 <- arima(indprod.ts, order = c(1, 0, 0))

Basically is c(1, 0, 0) correct?

I am not an expert in ARIMA models, but as for as my understanding goes, you can determine the ARIMA parameters by yourself by doing: auto.arima(indprod.ts, ic = c('bic'), trace = TRUE)

This formula will compute possible ARIMA models and shows which on is the best based on the BIC value. A lower BIC means that a model is more likely to be the true fitting model. The formula will for example give an output like: Best model: ARIMA(0,0,0)(0,1,1)[7].

In this case you can use the code: result.ar1 <- Arima(indprod.ts, order = c(0,0,0), seasonal = list(order = c(0,1,1), period = 7))

The order c(1,0,0) seems correct, but if you want an approach that determines the optimal parameters, I would suggest you to use the code above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM