【问题标题】:Time series estimation in R vs. MathematicaR 与 Mathematica 中的时间序列估计
【发布时间】:2014-11-27 10:11:18
【问题描述】:

我正在将 IMA(1,1) [或 ARIMA(0,1,1)] 模型拟合到时间序列。我尝试在 R 中使用 arima 函数,在 Mathematica(第 10 版)中使用 EstimatedProcess 函数,得到的结果非常不同。为什么?他们是否做出了不同的假设,在不同的情况下有效?有人对我应该使用哪一个有建议吗?

示例。首先,在 R 中。

> series <- c(-1.42377, 0.578605, -0.534659, -3.07486, -2.4468,
 -0.508346, -0.216464, -2.7485, -1.93354, -1.07292,
 -1.48064, -1.13934, -1.24597, 1.419, -1.22549,
 -2.44651, 1.54611, 1.80892, -0.863338, 1.21636)
> arima(series, order=c(0,1,1))

Call:
arima(x = series, order = c(0, 1, 1))

Coefficients:
          ma1
      -0.7807
s.e.   0.1548

sigma^2 estimated as 2.227:  log likelihood = -35.03,  aic = 74.07

现在,在 Mathematica 中:

series = {-1.42377, 0.578605, -0.534659, -3.07486, -2.4468, 
-0.508346, -0.216464, -2.7485, -1.93354, -1.07292, 
-1.48064, -1.13934, -1.24597, 1.419, -1.22549, 
-2.44651, 1.54611, 1.80892, -0.863338, 1.21636};
EstimatedProcess[series, ARIMAProcess[{}, 1, {ma1}, s2]]

产生:

ARIMAProcess[{}, 1, {-0.252596}, 3.30217]

如您所见,估计的 MA1 系数(R 中的 -0.7807,Mathematica 中的 -0.2526)和方差(2.227、3.302)都相当不同。

非常感谢您的任何见解或建议, 标记

【问题讨论】:

    标签: r wolfram-mathematica time-series


    【解决方案1】:

    好的,我想通了。默认情况下,Mathematica 函数 EstimatedProcessFindProcessParameters 使用矩量法。另一方面,R 函数arima 使用最大似然。所以如果你告诉 Mathematica 使用最大似然,就像这样

    series = {-1.42377, 0.578605, -0.534659, -3.07486, -2.4468, 
    -0.508346, -0.216464, -2.7485, -1.93354, -1.07292, 
    -1.48064, -1.13934, -1.24597, 1.419, -1.22549, 
    -2.44651, 1.54611, 1.80892, -0.863338, 1.21636};
    EstimatedProcess[series, ARIMAProcess[{}, 1, {ma1}, s2],
     ProcessEstimator -> "MaximumLikelihood"]
    

    你得到的答案与 R 完全相同:

    ARIMAProcess[{}, 1, {-0.780677}, 2.22661]
    

    【讨论】:

      猜你喜欢
      • 2014-09-04
      • 1970-01-01
      • 2015-10-24
      • 1970-01-01
      • 2014-09-14
      • 2021-04-26
      • 1970-01-01
      • 2012-11-29
      • 1970-01-01
      相关资源
      最近更新 更多