我有兴趣更改预测的特定值,并了解这将如何影响VAR模型中的后续预测
下面是一个例子
data(Canada)
> library(vars)
> myvar = VAR(Canada, p = 2, type = "both")
> pred = predict(myvar, n.ahead = 4)
> pred
$e
fcst lower upper CI
[1,] 962.6634 961.9480 963.3789 0.7154329
[2,] 963.6567 962.3399 964.9736 1.3168343
[3,] 964.6789 962.8010 966.5568 1.8779251
[4,] 965.6519 963.2565 968.0474 2.3954679
$prod
fcst lower upper CI
[1,] 417.1710 415.9300 418.4120 1.241005
[2,] 417.5871 415.7338 419.4404 1.853292
[3,] 418.0472 415.8064 420.2879 2.240711
[4,] 418.3845 415.8634 420.9055 2.521044
$rw
fcst lower upper CI
[1,] 470.2030 468.7028 471.7033 1.500232
[2,] 470.7656 468.7714 472.7598 1.994220
[3,] 471.4226 469.0397 473.8056 2.382959
[4,] 472.1569 469.4324 474.8814 2.724501
$U
fcst lower upper CI
[1,] 6.411520 5.863456 6.959584 0.5480636
[2,] 5.884437 5.004930 6.763944 0.8795066
[3,] 5.385965 4.215130 6.556800 1.1708352
[4,] 4.950624 3.516642 6.384606 1.4339819
我想将e的第一个预测从962.6635更改为1500.并且看看这将如何影响变量e,prod,rw和U的步骤2,3和4中的所有其他预测。是否存在在R?
中这样做的方法