【发布时间】:2017-04-19 20:08:51
【问题描述】:
有没有办法从 R 中的摘要过程中导出输出(类似于 SAS 中的 ods 输出)?
我有这个时间序列:
summary(ets(ts(c(100, 110, 120, 200, 300, 100, 200, 100, 120, 300), start = c(2009, 1), frequency = 12)))
当您运行此程序时,您会获得各种重要信息,例如 MAPE 和 RMSE。我想有选择地将其中一些指标分配给变量,以便在以后的其他流程中使用。
MAPE.ets <- [some bit of code that takes the MAPE from the output and pops it right here]
R 中有没有办法做到这一点?
编辑:经过一些回答后,我意识到 stlf ets 的行为与 ets 不同,我也需要一个适用于 stlf ets 的解决方案。
summary(stlf(ts(c(100, 110, 120, 200, 300, 100, 200, 100, 120, 300), start = c(2009, 1), frequency = 4)))
【问题讨论】:
-
感谢 Sotos,我从未听说过扫帚包,但看起来很有趣。