有马模型,缺少值

时间:2020-01-26 07:53:38

标签: r modeling arima

我正在尝试估计一个季度Arima模型,该模型可以通过一个或多个变量来解释VIX指数。我的问题是我需要区别并使用变量的日志,但是由于数据集缺少一些值,因此我发现'x'和'xreg'的长度不匹配。以下是我的数据集: enter image description here

这就是我想要做的:

y2 <- diff(log((histdata$VIX)))
y3 <- diff(log((histdata$SP500)))
y4 <- diff(log((histdata$NASDAQ)))
y5 <- diff(log((histdata$LIBOR3M)))
y6 <- diff(log((histdata$CPI)))
y7 <- diff(log((histdata$HPI)))
y8 <- diff(log((histdata$CDS5Y)))

arima(histdata$VIX, order = c(1, 1, 1),
     seasonal = list(order = c(0L,0L, 0L), period = 4),
     xreg = c(y2,y3,y4,y5,y6,y7,y8))

我需要以某种方式选择正确的变量长度,并按季度频率进行估算。

谢谢, 伊利亚斯

0 个答案:

没有答案