r - R中的Arima结构

标签 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

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

最佳答案

为了使结果相等,只需通过执行以下操作删除平均值即可:

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

详细说明参见this site.

关于r - R中的Arima结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15792291/

相关文章:

r - 使用purrr影响列表中每个数据框的单个列

r - 使用 ggplot2 使用预定义的文本宽度将文本放入绘图区域内的好方法是什么?

r - 如何清除或更改密度图中的默认轴标签和/或标题?

r - 在 R 中展平命名列表

r - R 中两个范围的重叠量 [DescTools?]

memory - 在 R 中分配一个更大的对象?

r - 使用 R : Make a new column that counts the number of times 'n' conditions from 'n' other columns occur

r - 使用 ggplot 将图例添加到多线图中

r - 保留 geom_rect() 中的顺序

python - 将张量的值传递给二维张量的下三角部分