Description Usage Arguments Value Examples
View source: R/HELPER_get_consistent_fc_values.R
get_consistent_fc_values
is a function that calculates the consistent
hierarchical forecasting values, based on already calculated forecasts.
1 | get_consistent_fc_values(main_forecasting_table, best_model_per_group)
|
main_forecasting_table |
A tibble object that contains run forecasts for
one split date and all groups. It is assumed that this is the output of the
|
best_model_per_group |
A tibble that containts the best fc_model for
each group. It is assumed that this tibble is created using the
|
A tibble with the consistent hierarchical forecast value for all groups in all forecast dates, at the specified forecast split date
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | main_forecasting_table <- dummy_hierarchical_gasprice %>%
dplyr::filter(oil_company == "CompanyA") %>%
tstools::initialize_ts_forecast_data(
date_col = "year_month",
col_of_interest = "gasprice",
group_cols = "currency",
hierarchical_col = "location"
) %>%
dplyr::filter(period >= as.Date("2004-06-30")) %>%
create_main_forecasting_table() %>%
dplyr::filter(ts_split_date == 200606) %>%
add_fc_models_to_main_forecasting_table(
fc_methods = c("basic", "linear")
)
best_model_per_group <- main_forecasting_table %>%
get_forecast_accuracy_overview() %>%
get_best_forecast_methods()
get_consistent_fc_values(
main_forecasting_table = main_forecasting_table,
best_model_per_group = best_model_per_group
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.