reconcile(.data, ...)
# S3 method for class 'mbl_df'
reconcile(.data, ...)reconcile() is deprecated in favour of dplyr::mutate() with the
reconcile_*() functions (reconcile_bu(), reconcile_td(),
reconcile_mo() and reconcile_mint()).
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())) %>%
dplyr::mutate(lm = reconcile_mint(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>