short_term_future: Generate future short-term demand predictions

View source: R/short_term_future.R

short_term_futureR Documentation

Generate future short-term demand predictions

Description

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.

Usage

short_term_future(
  shortterm_predictions,
  end_year,
  data_directory = tempdir(),
  model_list = NULL,
  verbose = FALSE
)

Arguments

shortterm_predictions

Dataframe. Generated by short_term_lm

end_year

Integer. Specifies the final year for which future predictions will be generated

data_directory

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.

model_list

A list with the models from short_term_lm. Only needs to be specified if the models are not in the data directory.

verbose

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

Value

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.

shortterm_future_predictions

A dataframe with the input and prediction data for the future short-term seasonality.

shortterm_future_plot

A plot with the prediction results.

See Also

See also function long_term_future and mid_term_future for the other prediction models.

Examples

example_shortterm_future_predictions <- short_term_future(example_shortterm_predictions,
  end_year = 2028
)

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