我从library(vars)
获得了以下预测。让我们称之为vecm.pred
$price
fcst lower upper CI
[1,] 4956.787 4864.032 5049.543 92.75548
[2,] 4948.936 4844.545 5053.327 104.39064
[3,] 5089.440 4979.941 5198.939 109.49891
[4,] 5076.999 4939.429 5214.569 137.56992
[5,] 5000.012 4854.955 5145.068 145.05669
[6,] 5072.107 4910.435 5233.780 161.67272
$people
fcst lower upper CI
[1,] 2529.799 2417.699 2641.899 112.1000
[2,] 2498.627 2269.438 2727.817 229.1893
[3,] 2410.037 2116.672 2703.402 293.3648
[4,] 2418.197 2094.965 2741.429 323.2320
[5,] 2371.373 2028.816 2713.929 342.5561
[6,] 2289.163 1941.386 2636.939 347.7764
我正尝试使用fanchart
在下面显示我的预测:
fanchart(vecm.pred, ylab = c("Price (€)","Volume"), main = c("Price","People"))
但是我无法克服以下问题:
1)如何将颜色从默认灰度更改为红色到黄色的热图?
2)如何为我的第一个和第二个情节准备替代的ylabs?正如我上面的ylab
函数为每个图提供了两个y轴名称。