R中的有马结构

时间:2013-04-03 16:01:03

标签: r

我怀疑在R中使用arima函数。如果我有一组数据,x1,我想弄清楚哪个是最好的Arima模型:

> arima(diff(x1),order=c(1,0,1))
Series: diff(x1) 
ARIMA(1,0,1) with non-zero mean 

Coefficients:
      ar1      ma1  intercept
    0.3835  -1.0000      3e-03
s.e.  0.1082   0.0339      6e-04

sigma^2 estimated as 0.005576:  log likelihood=88.75
AIC=-169.5   AICc=-168.95   BIC=-160.13

> arima(x1,order=c(1,1,1))
Series: x1 
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

为什么我会得到不同的值?

1 个答案:

答案 0 :(得分:1)

为了使结果相等,只需删除均值:

> arima(diff(x11), order = c(1,0,1), include.mean=FALSE)
> arima(x1, order = c(1,1,1))

有关详细说明,请参阅this site.