Skip to contents

Fit an ensemble forecast

Usage

ensemble_forecast(
  cv_set,
  y_var,
  id_vars,
  quantile_levels = c(0.025, 0.5, 0.975),
  inla_configs = NULL,
  glm_nb_configs = NULL,
  ranger_configs = NULL,
  arimax_configs = NULL,
  naive_configs = NULL,
  return_individual_models = FALSE
)

Arguments

cv_set

list of analysis and assessment data to forecast over

y_var

name of y variable

id_vars

name of columns used to identify each sample. Usually time period and orgUnit

quantile_levels

quantile level of prediction intervals. Default = c(0.025, 0.5,0.975) corresponding to 95% CI

inla_configs

named list of configuration for INLA model. Must include: reff_var, pred_vars, hyper_priors, W_orgUnit, sample_pi. See fit_inla for more info. If NULL (default), will not fit an inla model.

glm_nb_configs

named list of configuration for GLM model. Must include: pred_vars

ranger_configs

named list of configuation for ranger model. Must include: pred_vars, hyper_control. See fit_ranger for more info.

arimax_configs

named list of configuration for ARIMAX model. Must include: pred_vars, log_trans. See fit_arima for more info.

naive_configs

named list of configuration for naive model. Must include: group_vars. See fit_naive for more info.

return_individual_models

whether to return intermediate predictions from each model type. Default = FALSE

Value

Dataframe of prediction intervals for the ensemble predictions