ARIMA结构

时间:2013-04-02 14:48:30

标签: r time-series

我正在尝试使用AIC标准找到最佳模型结构。我已经知道d = 1且D = 1,季节性成分等于12.所以:

best.order<-c(0,0,0)
best.aic<-Inf
n <- length(x1)
for (i in 0:2) for (j in 0:2)  {
fit <- arima(log(x1), c(i, 1, j),seasonal = list(order = c(i, 1, j), period = 12),method="CSS-ML")
fit.aic <- -2 * fit$loglik + (log(n) + 1) * length(fit$coef) 
if (fit.aic < best.aic) {
best.order <- c(i,1,j)
best.arma <- arima(resid(fit), order=best.order)
best.aic <-fit.aic 
}
}

它给了我这个结果:

best.arima 
Call:
arima(x = resid(fit), order = best.order, seasonal = list(order = best.order, 
period = 12), method = "CSS-ML")

Coefficients:
      ma1     sma1
  -0.9275  -0.8904
s.e.   0.0899   0.4776

sigma^2 estimated as 0.0005297:  log likelihood = 143.67,  aic = -281.34

完全不同于:

auto.arima(log(x1),d=1,D=1)
ARIMA(1,1,1)                    

Coefficients:
     ar1      ma1
    0.4238  -0.8984
s.e.  0.1202   0.0489

sigma^2 estimated as 0.006367:  log likelihood=84.98
AIC=-163.96   AICc=-163.63   BIC=-156.93

哪个是正确的结果?

0 个答案:

没有答案