【问题标题】:How to Create an ARIMA model with specific MA (or q) terms in R如何在 R 中创建具有特定 MA(或 q)项的 ARIMA 模型
【发布时间】:2013-02-25 04:20:44
【问题描述】:

我无法确定使用 arima{stats} 来创建具有特定 MA 术语的 ARMA 模型的特定方法,而这些 MA 术语不仅仅由最大数量指定。

我的意思是,我需要指定一个 AR(1)MA(1,4) 模型,该模型应该导致截距、AR1 项、MA1 项和 MA4 项……但这是不同于 AR(1)MA(4) 模型,后者具有 MA1、MA2、MA3 和 MA(4) 的项。

我可以使用 tseries 包中的 arma 函数很好地做到这一点。

> ar1ma14.model<-arma(ppi.d, lag=list(ar=1, ma=c(1,4)))
Warning message:
In arma(ppi.d, lag = list(ar = 1, ma = c(1, 4))) : order is ignored

总结(ar1ma14.model)

Call:
arma(x = ppi.d, lag = list(ar = 1, ma = c(1, 4)))

Model:
ARMA(1,4)

Residuals:
   Min         1Q     Median         3Q        Max 
-0.0401487 -0.0056047  0.0004295  0.0045259  0.0379418 

Coefficient(s):
           Estimate  Std. Error  t value Pr(>|t|)    
ar1        0.765279    0.080376    9.521  < 2e-16 ***
ma1       -0.355297    0.102216   -3.476 0.000509 ***
ma4        0.297776    0.098485    3.024 0.002498 ** 
intercept  0.001855    0.001026    1.808 0.070603 .  

所以它适用于 arma,但 arma 函数没有 arima 相同的预测功能。

我已经尝试了在 arima(p,d,q) 中插入列表作为 q 的所有可能性,但我找不到任何其他人这样做的示例。

有人有想法吗?

【问题讨论】:

  • arima() 命令不允许使用术语子集。目前尚不清楚您为什么要这样做。

标签: r time time-series


【解决方案1】:

我想通了。

这就是季节性参数的用途,我怀疑,但无法使其正常工作。

本质上,AR(1)MA(1,4) 模型是一个 AR(1)MA(1) 模型,具有 t-4 周期的季节性移动平均值(这是有道理的,因为这是季度数据)。

所以使用 arima 的方法是:

ar1ma14.model<-arima(ppi.d, order=c(1,0,1), seasonal=list(order=c(0,0,1), period=4))

Call:
arima(x = ppi.d, order = c(1, 0, 1), seasonal = list(order = c(0, 0, 1), period = 4))

Coefficients:
         ar1      ma1    sma1  intercept
      0.8077  -0.3877  0.2297     0.0076
s.e.  0.0855   0.1295  0.0891     0.0032

同样,我需要测试一个 AR(2)MA(|4|) 模型,该模型仅包含 MA4 项,不包含 MA1、MA2 或 MA3。所以这将是一个带有季节性 MA4 的 AR(2) 模型......

ar2ma4.model<-arima(ppi.d, order=c(2,0,0), seasonal=list(order=c(0,0,1), period=4))

Call:
arima(x = ppi.d, order = c(2, 0, 0), seasonal = list(order = c(0, 0, 1), period = 4))

Coefficients:
         ar1     ar2    sma1  intercept
      0.4570  0.1611  0.2574     0.0078
s.e.  0.0769  0.0790  0.0841     0.0027

sigma^2 estimated as 0.0001147:  log likelihood = 523.37,  aic = -1036.75

【讨论】:

  • 这很有用,但是如何添加多个季节性术语?
猜你喜欢
  • 2021-07-30
  • 2016-10-06
  • 1970-01-01
  • 1970-01-01
  • 2014-05-04
  • 1970-01-01
  • 1970-01-01
  • 2018-07-10
  • 1970-01-01
相关资源
最近更新 更多