forecast.Arima 使用 xreg 和预测期数

forecast.Arima with xreg and the number of forecast periods

我正在尝试使用带有参数 xtregforecast.Arima 和预测期数 h 来预测值。

我在 R 中的代码:

monthlylFatal <- ts(Spainmonthly$fatalities, start=c(1995,1), end= c(2013,12), frequency=12)
Spainpps <- ts(Spainmonthly$pps.2007, start=c(1995,1), end=c(2013,12), frequency=12)
Spainfinanc.cris <- ts(Spainmonthly$financ.cris.2008, start=c(1995,1), end=c(2013,12), frequency=12)
xreg <- cbind(Spainpps,Spainfinanc.cris)

arima1=Arima(logmonthlylFatal,order=c(0,1,1), seasonal=c(1,1,2), xreg = xreg)
forecast.arima1=forecast.Arima(arima1, xreg = xreg, h=84)
forecast.arima1

我想预测 2014 年 1 月到 2020 年 12 月 (h=84),但它预测的时间超出我的需要(超过 2030 年 8 月)。我不明白为什么。

经常阅读帮助文件:

h: Number of periods for forecasting. If xreg is used, h is ignored and the number of forecast periods is set to the number of rows of xreg.