Transform forecast package Output to appropriate hubVerse format
Source:R/trans_forecastsarima_hv.R
trans_forecastpkg_hv.RdConverts the output from a forecasting model from the `forecast` package to the required hub format for submission to a forecasting hub.
Usage
trans_forecastpkg_hv(
fc_output = fc_sarima,
model_name = "AMPH-sarima",
target = "wk inc flu hosp",
reference_date,
horizon_time_steps = 0:3,
geo_ids = "md"
)Arguments
- fc_output
Data frame. Output from a `forecast` package forecasting model.
- model_name
Character. Name of the forecasting model. Default is "AMPH-epipredict-arx".
- target
Character. Target variable name. Default is "wk inc flu hosp".
- reference_date
Date. The date of the forecast reference. This should be in "YYYY-MM-DD" format.
- horizon_time_steps
Integer vector. Time steps for the forecast horizon. Default is 0:3 (0 to 3 weeks ahead).
- geo_ids
Character vector. Geographic location identifiers. Default is "md".
Examples
if (FALSE) { # \dontrun{
library(AMPHForecastSuite)
setup_file_structure(project_dir = "My_Forecast_Project")
# Assuming you have ARX forecast output
hub_forecast <- trans_forecastpkg_hv(fc_output = fc_sarima,
model_name = "AMPH-sarima",
target = "wk inc flu hosp",
reference_date = forecast_date + 6,
horizon_time_steps = 0:3,
geo_ids = "md")
} # }