In this section, we will only illustrate the bagging technique for the ETS model. The main purpose of bagging is to stabilize the predictions or forecasts. Here, we will base the bagging on the Box-Cox and Loess-based decomposition. Using 500 such bootstrap samples, the bagging model for ETS will be obtained:
>uspop_bagg_ets <- baggedETS(uspop_sub,bootstrapped_series = + bld.mbb.bootstrap(uspop_sub, 500)) >forecast(uspop_bagg_ets,h=4);subset(uspop,start=16,end=19) Point Forecast Lo 100 Hi 100 1940 141 136 145 1950 158 150 165 1960 175 164 184 1970 193 178 204 Time Series: Start = 1940 End = 1970 Frequency = 0.1 [1] 132 151 179 203 >plot(forecast(uspop_bagg_ets,h=4))
Is there an advantage to using the bagging method? We can quickly check this using the confidence intervals:
>forecast(uspop_bagg_ets,h=4) Point Forecast Lo 100 Hi 100 1940 ...