View source: R/long_term_future.R
long_term_future | R Documentation |
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
)
longterm_future_macro_data |
Dataframe. Generated by |
data_directory |
The path to the directory where the data will be saved and where the function will look for
the long-term models from |
model_list |
A list with the models from |
verbose |
A boolean value indicating if you want the generated plots to be shown (set to TRUE if yes). |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.