combine_models_future: Combine forecast models for future predictions

View source: R/combine_models_future.R

combine_models_futureR Documentation

Combine forecast models for future predictions

Description

This function combines the three separate future forecasts for the low, mid and high frequency model. The three separate forecasts need to be run first and should have the same end_year.

Usage

combine_models_future(
  longterm_future_predictions,
  midterm_future_predictions,
  shortterm_future_predictions,
  longterm_model_number = 1,
  data_directory = tempdir(),
  verbose = FALSE
)

Arguments

longterm_future_predictions

Dataframe. The dataframe object resulting from function long_term_future.

midterm_future_predictions

Dataframe. The dataframe object resulting from function mid_term_future.

shortterm_future_predictions

Dataframe. The dataframe object resulting from function short_term_future.

longterm_model_number

Integer. Specifies which of the 3 best long-term models should be used.

data_directory

The path to the directory where the results and plots will be saved. The default is set to a temporary directory.

verbose

A boolean value indicating if you want the generated plots to be shown (set to TRUE if yes).

Value

A list with the dataframe with the combined model results. And a list with the plotted results. The combined model predictions and plots are saved in the respective folder for the country.

combined_model_future_predictions

A dataframe with the combined model results.

combined_model_future_plots

A list with the plot for the full timeseries, a plot with two sample weeks, and a stacked plot with both.

See Also

See also functions long_term_future, mid_term_future, and short_term_future for the prediction models.

Examples

example_full_model_future_predictions <- combine_models_future(example_longterm_future_predictions,
  example_midterm_future_predictions, example_shortterm_future_predictions,
  longterm_model_number = 1
)


oRaklE documentation built on June 8, 2025, 12:41 p.m.