Smooth - es - prediction intervals

Hi all,

I use the es() function of smooth to make an exponential smoothing. Now I want to plot my forecasting result optically matching with the rest of my report, therefore I try to use the values of my resulting forecast and I need prediction specific intervals (.80 and .95). With autoplot and autpolayer I am able to achieve somewhat the result I want. The model is just an minimal example. The problem is I want my intervals in matching colors. Which gg element should I use for this and how can I specify my x, y values if I use manual ggplot elements. I hope this was somehow clear. Sorry if its a very basic questions I just struggle to get the architecture of the fc model or how to dissect it to use it manually.

library(smooth)
library(Mcomp)
library(ggplot2)

myDat_train <- M3[[700]]$x

myDat_train %>% autoplot()

fit_e <- es(myDat_train)
fit_e_2 <- es(fit_e)

fc <- forecast(fit_e, h=8, ,level = 0.95)

fc_2 <- forecast(fit_e_2, h=8, level = 0.80)

#Accuracy tests

myDat_train %>% autoplot() +
autolayer(fc$mean) +
autolayer(fc$upper) +
autolayer(fc$lower) +
autolayer(fc_2$upper) +
autolayer(fc_2$lower)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.