Q: What exactly are bootstrap simulated forecast paths of hierarchically reconciled forecasts in R’s fable
package? To my surprise, they’re not the result of bootstrap simulating baseline forecasts and reconciling each of those, as I show below.
From Forecasting Principles and Practice, Ch. 11.2
library(fpp3)
tourism_states <- tourism |>
aggregate_key(State, Trips = sum(Trips))
tourism_states |>
model(ets = ETS(Trips)) |>
reconcile(bu = bottom_up(ets)) |>
forecast()
#> # A fable: 144 x 5 [1Q]
#> # Key: State, .model [18]
#> State .model Quarter Trips .mean
#> <chr*> <chr> <qtr> <dist> <dbl>
#> 1 ACT ets 2018 Q1 N(701, 7651) 701.
#> 2 ACT ets 2018 Q2 N(717, 8032) 717.
#> 3 ACT ets 2018 Q3 N(734, 8440) 734.
#> 4 ACT ets 2018 Q4 N(750, 8882) 750.
#> 5 ACT ets 2019 Q1 N(767, 9368) 767.
#> 6 ACT ets 2019 Q2 N(784, 9905) 784.
#> 7 ACT ets 2019 Q3 N(800, 10503) 800.
#> 8 ACT ets 2019 Q4 N(817, 11171) 817.
#> 9 ACT bu 2018 Q1 N(701, 7651) 701.
#> 10 ACT bu 2018 Q2 N(717, 8032) 717.
where, as I expect, the .mean
value in row 1 equals that in row 9, row 2 equals that in row 10, and so on. In other words, the baseline forecasts ets
at the lowest level of the hierarchy (here, that’s State
) are the same as the bottom-up reconciled forecasts bu
.
But then, the following surprised me.
tourism_states |>
model(ets = ETS(Trips)) |>
reconcile(bu = bottom_up(ets)) |>
forecast(boostrap=TRUE,times=1)
# # A fable: 144 x 5 [1Q]
# # Key: State, .model [18]
# State .model Quarter Trips .mean
# <chr*> <chr> <qtr> <dist> <dbl>
# 1 ACT ets 2018 Q1 sample[1] 650.
# 2 ACT ets 2018 Q2 sample[1] 671.
# 3 ACT ets 2018 Q3 sample[1] 519.
# 4 ACT ets 2018 Q4 sample[1] 631.
# 5 ACT ets 2019 Q1 sample[1] 824.
# 6 ACT ets 2019 Q2 sample[1] 643.
# 7 ACT ets 2019 Q3 sample[1] 647.
# 8 ACT ets 2019 Q4 sample[1] 810.
# 9 ACT bu 2018 Q1 sample[1] 744.
# 10 ACT bu 2018 Q2 sample[1] 568
The bottom-up forecasts are no longer the same as the baseline forecasts ets
. I expected bootstrapping in this context meant that forecast sample paths of the baseline forecasts were constructed and then each of those would be reconciled bottom-up. But that’s clearly not happening.
So then, what exactly are these bottom-up forecasts bu
in the context of bootstrapping? Are they the result of sampling in-sample fit residuals from the baseline forecasts and applying them to the bottom-up forecast, where one would not expect these sort of bottom-up simulations to equal the baseline simulations.