This function extends the long-term trend predictions generated by long_term_lm until a specified future year.
The unknown macro-economic covariates are either obtained from the WEO Outlook with long_term_future_data or can be supplied manually.
The function also produces and saves visualizations of the actual and the predicted demand over the training, test, and future periods.
long_term_future(
longterm_future_macro_data,
data_directory = tempdir(),
model_list = NULL,
verbose = FALSE
)A list with the extended initial dataframe with the future predictions for each of the 3 best long term models and one plot with the respective results per model.
A dataframe with the input data and additional columns for test_set_steps and for best three models longterm_model_predictions1, longterm_model_predictions2 and longterm_model_predictions3.
A list with the respective plots for each model.
Dataframe. Generated by long_term_future_data
The path to the directory where the data will be saved and where the function will look for
the long-term models from long_term_lm. The default is set to a temporary directory.
A list with the models from long_term_lm. Only needs to be specified if the models
are not in the data directory.
A boolean value indicating if you want the generated plots to be shown (set to TRUE if yes).
See also function mid_term_future and short_term_future for the other prediction models and long_term_future_data for the covariate download.
example_longterm_future_predictions <- long_term_future(example_longterm_future_macro_data)
Run the code above in your browser using DataLab