0

I am trying to overlay Holt-Winter fitted values (red) with original values (black) in R, but the red line does not begin from the start.

Perhaps this is related to the size of moving window, if yes, how do I alter in the HoltWinter() object in R?

Tried:

dfts <- dfts$Monthly_Sales %>% ts(start = c(2019, 1), end = c(2021, 12), frequency = 12)
hw1 <- HoltWinters(dfts)
hw1.pred <- predict(hw1, n.ahead = 24, prediction.interval = TRUE, level = 0.95)
plot(hw1, predicted.values = hw1.pred, ylab = "Sales Amt")

Expecting: Red line to begin from the start or near to the start.

Got:

enter image description here

Thanks.

yuenherny
  • 125
  • 1
  • 8

0 Answers0