Learn R Programming

fabletools (version 0.5.0)

reconcile: Forecast reconciliation

Description

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

Usage

reconcile(.data, ...)

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

Arguments

.data

A mable.

...

Reconciliation methods applied to model columns within .data.

Examples

Run this code
if (FALSE) { # requireNamespace("fable", quietly = TRUE)
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()
}

Run the code above in your browser using DataLab