1
我需要一种方法来打印预测值。使用预测包从预测中获取预测点估计值和间隔
我需要打印深蓝色的线条值,如果可能的话,打印下面图片中灰色区域的值。
什么是打印该值或打印2019预测值的代码?
library(forecast)
timese <- ts(WWWusage, start = c(2008, 1), end = c(2016, 1), frequency = 12)
### Structural Time Series Model
# Trend likelihood
fit <- StructTS(timese, "trend")
### Make the plot
plot(forecast(fit, level = c(70, 90)),
sub = "Confidence Interval 70% ~ 90% or Determined by user",
ylab = "Y Axis Variable",
main = "Forecast Linear Structural Model @ Trend-Wise",
ylim = c(0, 400))
非常感谢。你介意我问“Lo 70”“Hi 70”的含义是什么? –
它们是预测区间(PI)的下限和上限。本质上,通过指定“level = c(70,90)”,你说适合具有第70和第90 [预测区间]的模型(https://en.wikipedia.org/wiki/Prediction_interval)。更正式地说,PI是与尚未观察到的随机变量相关联的区间,随机变量的特定概率位于该区间内。在这个例子中,我给出了2016年3月的227和253之间90%的区间。2016年3月的实际值应该在0.90的概率区间内。 – JasonAizkalns