我使用差分变量的 ARIMA 模型预测 4 个季度。但是,我无法取回调整后的值,即与原始值对齐的预期预测值。
下面是我的代码:
fit<-arima(Y, order = c(1, 0, 1),seasonal = list(order = c(0L, 0L, 0L), period = NA), xreg = training, include.mean = TRUE, method = "CSS",SSinit = "Rossignol2011",0, optim.method = "L-BFGS-B", kappa = 1e6)
x<-predict(fit,n.ahead = 4,newxreg = testing)
diffinv(x,lag=1,xi=Y[n])