Reconciles a hierarchy using the top down reconciliation method. The response variable of the hierarchy must be aggregated using sums. The forecasted time points must match for all series in the hierarchy, which must be strictly hierarchical.

reconcile_td(
  model,
  method = c("forecast_proportions", "average_proportions", "proportion_averages")
)

top_down(
  models,
  method = c("forecast_proportions", "average_proportions", "proportion_averages")
)

Arguments

model

A column of models in a mable (e.g. mutate(ets = reconcile_mint(ets))), a model data frame, or a model specification (e.g. model(ets = reconcile_mint(ETS(y)))).

method

The method used to compute the disaggregation proportions: the proportions of the forecasts ("forecast_proportions"), the average of the historical proportions ("average_proportions"), or the proportions of the historical averages ("proportion_averages").

models

Used instead of model by the superseded names.

Details

The forecasts of the top level are disaggregated by proportions, so only its forecast distribution is used. Normal distributions and sample paths are disaggregated as such, while other distributions give degenerate (point) forecasts.

Superseded names

[Superseded]

top_down() is the original name of reconcile_td(), and is kept for existing code. New code should use reconcile_td(), consistent with the other reconcile_*() functions.

Examples

library(fable)
lung_deaths_agg <- as_tsibble(cbind(mdeaths, fdeaths)) %>%
  aggregate_key(key, value = sum(value))

lung_deaths_agg %>%
  model(ets = ETS(value)) %>%
  dplyr::mutate(ets = reconcile_td(ets, method = "average_proportions")) %>%
  forecast()
#> # A fable: 72 x 5 [1M]
#> # Key:     key, .model [3]
#>    key     .model    index
#>    <chr*>  <chr>     <mth>
#>  1 fdeaths ets    1980 Jan
#>  2 fdeaths ets    1980 Feb
#>  3 fdeaths ets    1980 Mar
#>  4 fdeaths ets    1980 Apr
#>  5 fdeaths ets    1980 May
#>  6 fdeaths ets    1980 Jun
#>  7 fdeaths ets    1980 Jul
#>  8 fdeaths ets    1980 Aug
#>  9 fdeaths ets    1980 Sep
#> 10 fdeaths ets    1980 Oct
#> # ℹ 62 more rows
#> # ℹ 2 more variables: value <dist>, .mean <dbl>