I have this dataset that contains multiple series (50 products). My dataset has 50 products (50 columns). each column contains the monthly sales of a product. I recently learned about bootstrap and how it can improve forecast accuracy. Therefore, I decided to compare the results that I will get when using ets, Arima, and when using bootstrapping method. Here is my code and I would love if someone can help me understand how to apply bootstrap on a time series and how to use it with other forecasting techniques. So far I've used ets
and Arima
without bootstrap and now I want to use bootstrapping and then compare the results of each method and prove which one is the best method to forecast time series.
library(fable)
library(dplyr)
library(tidyr)
library(ggplot2)
y <- ts(matrix(rnorm(175*50), ncol=50), frequency=12, start=c(2007,1)) %>%
as_tsibble() %>%
rename(Month = index, Sales=value)
fit.ets <- y %>% model(ETS(Sales))
fit.ets
f.ets <- forecast(fit.ets, h=12)
f.ets
forecast
package in R might contain a function that doesets
+ bagging. There is a paper and, I think, a blog post by Rob J. Hyndman aboutets
+ bagging and how it works very well on M3 competition data. See this chapter of the FPP textbook. $\endgroup$