0

Method: Holt-Winters; trend, non-seasonal

h/forecast period; 92 days, training data goes back 5 years

Issue: I don't know how to get multiple forecasts on the same plot

---First forecast through /30/20020

I am making a Holt-Winters forecast of data from the PHLX semiconductor industry. I have a forecast based on 5 years of data going through 7/31/2020. I would like to super-impose this onto another forecast of the same data, but have the second forecast only go through 2/14/2020. the idea is: "If I had forecasted at this date, here is what it would have looked like.

I am currently using the plot() function. I feel like I would be able to do this with ggplot(), but I can't figure out how to handle the aes() arguments in the case of a forecast. I tried to cast the forecast as a vector, but I discovered the vector only has length 10, I am forecasting 92 days ahead (the period is days here).

I greatly appreciate any insight on how to accomplish my goal!

forecast

Current code:

plot(forecast(Final_Model))

abline(v = 156, color = "blue", ity = 1, iwd = 1)

abline(v = 521, color = "blue", ity = 1, iwd = 1)

abline(v = 886, color = "blue", ity = 1, iwd = 1)

abline(v = 1251, color = "blue", ity = 1, iwd = 1)

abline(v = 1616, color = "blue", ity = 1, iwd = 1)

abline(v = 1654, color = "blue", ity = 1, iwd = 1)
Prasanna S
  • 353
  • 1
  • 10
  • Hi, welcome to stack overflow. Can you please include a reproducible example, which will make it easier for others to help you.Consider looking at [this](https://stackoverflow.com/help/minimal-reproducible-example) and this https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. Including your code would be a great first step. – Mark Neal Aug 03 '20 at 02:13
  • plot(forecast(Final_Model)) abline(v = 156, color = "blue", ity = 1, iwd = 1) abline(v = 521, color = "blue", ity = 1, iwd = 1) abline(v = 886, color = "blue", ity = 1, iwd = 1) abline(v = 1251, color = "blue", ity = 1, iwd = 1) abline(v = 1616, color = "blue", ity = 1, iwd = 1) abline(v = 1654, color = "blue", ity = 1, iwd = 1) – Jairaj Ranchod Aug 03 '20 at 02:42

0 Answers0