Description Usage Arguments Value Examples
View source: R/POST_FORECAST_add_hierarchical_fc_models_to_main_forecasting_table.R
add_hierarchical_fc_models_to_main_forecasting_table
is a wrapper
function, that combines previously computed forecasts according to their
hierarchy and adds them to the main forecasting table.
1 | add_hierarchical_fc_models_to_main_forecasting_table(main_forecasting_table)
|
main_forecasting_table |
A tibble object that contains run forecasts for
all split dates and all groups. It is assumed that this is the output of
the |
The main_forecasting_table (input) with the addition of the consistent and bottom up hierarchical forecast models (within the fc_model column), and their errors (within the fc_errors column.)
1 2 3 4 5 6 7 8 9 10 11 12 13 | dummy_hierarchical_gasprice %>%
tstools::initialize_ts_forecast_data(
date_col = "year_month",
col_of_interest = "gasprice",
group_cols = "currency",
hierarchical_cols = c("location", "oil_company")
) %>%
dplyr::filter(period >= as.Date("2004-10-31")) %>%
create_main_forecasting_table() %>%
add_fc_models_to_main_forecasting_table(
fc_methods = c("basic", "linear")
) %>%
add_hierarchical_fc_models_to_main_forecasting_table()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.