简体   繁体   English

AR(2) R 软件中的 model

[英]AR(2) model in R software

can a AR(2) model be written with code:可以用以下代码编写 AR(2) model:

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

Basically is c(1, 0, 0) correct?基本上 c(1, 0, 0) 正确吗?

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)我不是 ARIMA 模型方面的专家,但就我的理解而言,您可以通过以下方式自行确定 ARIMA 参数: 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.该公式将计算可能的 ARIMA 模型,并根据 BIC 值显示最佳模型。 A lower BIC means that a model is more likely to be the true fitting model.较低的 BIC 意味着 model 更可能是真正的拟合 model。 The formula will for example give an output like: Best model: ARIMA(0,0,0)(0,1,1)[7].例如,该公式将给出 output,例如:最佳 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))在这种情况下,您可以使用代码: 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.顺序 c(1,0,0) 似乎是正确的,但是如果您想要一种确定最佳参数的方法,我建议您使用上面的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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