comb_WA function

Winsorized Mean Forecast Combination

Winsorized Mean Forecast Combination

Computes a combined forecast from a pool of individual model forecasts using winsorized mean at each point in time.

comb_WA(x, trim_factor = NULL, criterion = "RMSE")

Arguments

  • x: An object of class foreccomb. Contains training set (actual values + matrix of model forecasts) and optionally a test set.
  • trim_factor: numeric. Must be between 0 and 0.5.
  • criterion: If trim_factor is not specified, an optimization criterion for automated trimming needs to be defined. One of "MAE", "MAPE", or "RMSE" (default).

Returns

Returns an object of class foreccomb_res with the following components: - Method: Returns the used forecast combination method.

  • Models: Returns the individual input models that were used for the forecast combinations.

  • Weights: Returns the combination weights obtained by applying the combination method to the training set.

  • Trim Factor: Returns the trim factor, λ\lambda.

  • Fitted: Returns the fitted values of the combination method for the training set.

  • Accuracy_Train: Returns range of summary measures of the forecast accuracy for the training set.

  • Forecasts_Test: Returns forecasts produced by the combination method for the test set. Only returned if input included a forecast matrix for the test set.

  • Accuracy_Test: Returns range of summary measures of the forecast accuracy for the test set. Only returned if input included a forecast matrix and a vector of actual values for the test set.

  • Input_Data: Returns the data forwarded to the method.

Details

Suppose yty_t is the variable of interest, there are NN not perfectly collinear predictors, ft=(f1t,,fNt)f_t = (f_{1t}, \ldots, f_{Nt})'. For each point in time, the order forecasts are computed:

ftord=(f(1)t,,f(N)t)(ft)ord=(f(1)t,,f(N)t) \mathbf{f}_t^{ord} = (f_{(1)t}, \ldots, f_{(N)t})'(f_t)_ord = (f_{(1)t}, \ldots, f_{(N)t})'

Using a trim factor λ\lambda (i.e., the top/bottom λ%\lambda \% are winsorized), and setting K=NλK = N\lambda , the combined forecast is calculated as (Jose and Winkler, 2008):

y^t=1N[Kf(K+1)t+i=K+1NKf(i)t+Kf(NK)t]y^t=1/N[Kf(K+1)t+i=K+1NKf(K)t+Kf(NK)t] \hat{y}_t = \frac{1}{N} \left[Kf_{(K+1)t} + \sum_{i=K+1}^{N-K} f_{(i)t} + Kf_{(N-K)t}\right]\hat{y}_t = 1/N *[Kf_{(K+1)t} + \sum_{i=K+1}^{N-K} f_{(K)t} + Kf_{(N-K)t}]

Like the trimmed mean, the winsorized mean is a robust statistic that is less sensitive to outliers than the simple average. It is less extreme about handling outliers than the trimmed mean and preferred by Jose and Winkler (2008) for this reason.

This method allows the user to select λ\lambda (by specifying trim_factor), or to leave the selection to an optimization algorithm -- in which case the optimization criterion has to be selected (one of "MAE", "MAPE", or "RMSE").

Examples

obs <- rnorm(100) preds <- matrix(rnorm(1000, 1), 100, 10) train_o<-obs[1:80] train_p<-preds[1:80,] test_o<-obs[81:100] test_p<-preds[81:100,] ## User-selected trim factor: data<-foreccomb(train_o, train_p, test_o, test_p) comb_TA(data, trim_factor=0.1) ## Algorithm-optimized trim factor: data<-foreccomb(train_o, train_p, test_o, test_p) comb_TA(data, criterion="RMSE")

Author(s)

Christoph E. Weiss and Gernot R. Roetzer

References

Jose, V. R. R., and Winkler, R. L. (2008). Simple Robust Averages of Forecasts: Some Empirical Results. International Journal of Forecasting, 24(1) , 163--169.

See Also

winsor.mean, foreccomb, plot.foreccomb_res, summary.foreccomb_res, comb_SA, comb_TA, accuracy

  • Maintainer: Christoph E. Weiss
  • License: GPL (>= 2)
  • Last published: 2016-11-27