This function gets predictions from the World Economic Outlook Database (April 2025 edition) for the covariates utilized in the long-term models. If the dataset argument is not set to "WEO",
the function will indicate which covariates require user-supplied predictions for long_term_future.
long_term_future_data(
longterm_predictions,
end_year,
dataset = "WEO",
data_directory = tempdir(),
model_list = NULL
)The extended initial dataframe until the specified end year with the covariate predictions if dataset = "WEO" . Otherwise, the dataframe will have empty covariate predictions and a note for which covariates a forecast must be supplied.
Dataframe or list. Generated by long_term_lm. Either the prediction dataframe or the complete output list can be used.
If the full list is supplied the function will extract the necessary models automatically.
Integer. Specifies the final year for which future predictions will be generated.
Character. By default the World Economic Outlook (WEO) Database April 2025 edition is used to generate covariate predictions for the long term models. If the dataset option is set to anything else than "WEO" the function will tell you for which covariates data will be needed to run long_term_future.
The path to the directory where the function will look for
the long-term models from long_term_lm. Only needed if dataset is not set to "WEO" and no model list is supplied.
A list with the models from long_term_lm. Only needs to be specified if dataset is not set to "WEO" and if the models
are not in the data directory.
example_longterm_future_macro_data <- long_term_future_data(example_longterm_predictions,
end_year = 2028, dataset = "WEO"
)
Run the code above in your browser using DataLab