Hi guys,
I was trying to combine some models to get a better forecast, I did not find any particular resource to follow, here you can find my dummy data to try it.
Any help would be very appreciated.
Regards,
Lucas
library(tidyverse)
library(tsibble)
library(fable)
iniciativa <- tibble(
data_planejada = seq(as.Date("2020-01-01"), length = 200, by = "1 day"),
demanda = sample(seq(100), size = 200, replace = TRUE)
) %>%
as_tsibble(index = data_planejada)
iniciativa_cv <- iniciativa %>%
slice(1:(n() - 5)) %>%
stretch_tsibble(.init=180, .step=1)
comb_model <- iniciativa_cv %>%
model(
cmbn = combination_model(RW(demanda ~ drift(),ETS(demanda ~ error("A") + trend("Ad", phi = 0.8) + season("N"), ARIMA(demanda ~ pdq(1, 0, 0) + PDQ(0, 0, 0)))))
)