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