forecast_ensemble: Generate an out-of-sample Ensemble forecast from the CSR and...

forecast_ensembleR Documentation

Generate an out-of-sample Ensemble forecast from the CSR and Bagging models

Description

Generate an out-of-sample Ensemble forecast from the CSR and Bagging models

Usage

forecast_ensemble(
  data,
  y,
  horizon = 12,
  K = 20,
  k = 15,
  R = 500,
  pre_testing = "group-joint",
  seasonal_dummies = TRUE,
  auto_scenario = TRUE,
  xreg_scenario,
  ...
)

Arguments

data

A tsibble object

y

Column name of the variable of interest

horizon

Forecast horizon

K

Number of variables to be selected after the pre-testing. If K=ncol(x) the pre-testing is redundant (see HDeconometrics::csr).

k

Number of variables in each subset. Must be smaller than K (see HDeconometrics::csr).

R

Number of bootstrap replucations (see HDeconometrics::bagging).

pre_testing

The type of pre-testing (see HDeconometrics::bagging).

seasonal_dummies

If TRUE, seasonal dummies are created for model estimation and out-of-sample forecasting.

auto_scenario

If TRUE, the forecast::auto.arima function is used to generate scenarios for the independent variables in horizon out-of-sample periods. If FALSE, the user must supply a xreg_scenario matrix with the scenarios, containing a number of lines equal to horizon.

xreg_scenario

Scenario matrix for independent variables if auto scenario is FALSE.

...

Other arguments passed to HDeconometrics::bagging

Value

A tibble

Examples

df_macro <- ts_transform(get_data(), "ipca", seasonal_dummies = FALSE)
df_fcsts <- forecast_ensemble(df_macro, "ipca")

schoulten/ipca documentation built on May 27, 2022, 10:05 p.m.