我想通过比较实际值和预测值来使用MAE方法进行预测的测量精度。我在包预测中使用了ets()。
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
349 14.50443 13.73768 15.27118 13.33178 15.67707
350 14.50443 13.57620 15.43266 13.08482 15.92403
351 14.50443 13.43881 15.57004 12.87471 16.13414
352 14.50443 13.31713 15.69172 12.68862 16.32024
353 14.50443 13.20673 15.80213 12.51977 16.48909
354 14.50443 13.10493 15.90393 12.36408 16.64478
355 14.50443 13.00998 15.99888 12.21886 16.78999
356 14.50443 12.92064 16.08822 12.08223 16.92663
357 14.50443 12.83601 16.17284 11.95281 17.05605
358 14.50443 12.75541 16.25344 11.82954 17.17932
359 14.50443 12.67831 16.33055 11.71162 17.29724
360 14.50443 12.60427 16.40458 11.59839 17.41047
361 14.50443 12.53296 16.47590 11.48933 17.51953
362 14.50443 12.46409 16.54477 11.38399 17.62486
363 14.50443 12.39741 16.61145 11.28202 17.72684
364 14.50443 12.33273 16.67613 11.18310 17.82576
365 14.50443 12.26987 16.73899 11.08697 17.92189
366 14.50443 12.20868 16.80017 10.99339 18.01547
367 14.50443 12.14904 16.85981 10.90218 18.10668
368 14.50443 12.09083 16.91803 10.81314 18.19571
369 14.50443 12.03394 16.97492 10.72614 18.28272
370 14.50443 11.97829 17.03057 10.64103 18.36783
371 14.50443 11.92379 17.08506 10.55769 18.45117
372 14.50443 11.87039 17.13847 10.47601 18.53285
373 14.50443 11.81800 17.19086 10.39589 18.61297
374 14.50443 11.76657 17.24228 10.31724 18.69162
375 14.50443 11.71606 17.29280 10.23998 18.76888
376 14.50443 11.66640 17.34246 10.16404 18.84482
377 14.50443 11.61756 17.39130 10.08934 18.91951
378 14.50443 11.56949 17.43936 10.01583 18.99302
这些是30个预测值,但我想只采用预测列,但无法提取它。 我试过这样做,
library(forecast)
> f<-ets(st1)
> a<-predict(f,30)
> a$Forecast
显示NULL。你能帮帮我吗?谢谢
答案 0 :(得分:0)
a[["Point Forecast"]]
可能会这样做,因为“点预测”似乎是列名,或 a[[1]]
,因为它是第一个a[[2]]
,因为它是第二栏。