This function allows you to specify the method used to reconcile forecasts in accordance with its key structure.

reconcile(.data, ...)

# S3 method for class 'mdl_df'
reconcile(.data, ...)

Arguments

.data

A mable.

...

Reconciliation methods applied to model columns within .data.

Examples

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

lung_deaths_agg %>%
  model(lm = TSLM(value ~ trend() + season())) %>%
  reconcile(lm = min_trace(lm)) %>% 
  forecast()
#> # A fable: 72 x 5 [1M]
#> # Key:     key, .model [3]
#>    key     .model    index
#>    <chr*>  <chr>     <mth>
#>  1 fdeaths lm     1980 Jan
#>  2 fdeaths lm     1980 Feb
#>  3 fdeaths lm     1980 Mar
#>  4 fdeaths lm     1980 Apr
#>  5 fdeaths lm     1980 May
#>  6 fdeaths lm     1980 Jun
#>  7 fdeaths lm     1980 Jul
#>  8 fdeaths lm     1980 Aug
#>  9 fdeaths lm     1980 Sep
#> 10 fdeaths lm     1980 Oct
#> # ℹ 62 more rows
#> # ℹ 2 more variables: value <dist>, .mean <dbl>