This function extends the short-term demand predictions generated by short_term_lm until a specified future year.
The function also produces and saves visualizations of the actual and the predicted demand over the training, test, and future periods.
short_term_future(
shortterm_predictions,
end_year,
data_directory = tempdir(),
model_list = NULL,
verbose = FALSE
)The extended initial dataframe with the future predictions for the short term model.
A list with the extended initial dataframe with the future predictions for the short term model. And the plot with the shortterm seasonality future forecast. The dataset and the plot are saved in the respective folder for the country.
A dataframe with the input and prediction data for the future short-term seasonality.
A plot with the prediction results.
Dataframe. Generated by short_term_lm
Integer. Specifies the final year for which future predictions will be generated
The path to the directory where the data will be saved and where the function will look for
the short-term models from short_term_lm. The default is set to a temporary directory.
A list with the models from short_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 long_term_future and mid_term_future for the other prediction models.
example_shortterm_future_predictions <- short_term_future(example_shortterm_predictions,
end_year = 2028
)
Run the code above in your browser using DataLab