Learn R Programming

GeomComb (version 1.0)

comb_EIG4: Trimmed Bias-Corrected Eigenvector Forecast Combination

Description

Computes forecast combination weights according to the trimmed bias-corrected eigenvector approach by Hsiao and Wan (2014) and produces forecasts for the test set, if provided.

Usage

comb_EIG4(x, ntop_pred = NULL, criterion = "RMSE")

Arguments

x
An object of class foreccomb. Contains training set (actual values + matrix of model forecasts) and optionally a test set.
ntop_pred
Specifies the number of retained predictors. If NULL (default), the inbuilt optimization algorithm selects this number.
criterion
If ntop_pred is not specified, a selection criterion is required for the optimization algorithm: one of "MAE", "MAPE", or "RMSE". If ntop_pred is selected by the user, criterion should be set to NULL (default).

Value

Returns an object of class foreccomb_res with the following components: with the following components:

Details

The underlying methodology of the trimmed bias-corrected eigenvector approach by Hsiao and Wan (2014) is the same as their bias-corrected eigenvector approach. The only difference is that the bias-corrected trimmed eigenvector approach pre-selects the models that serve as input for the forecast combination, only a subset of the available forecast models is retained, while the models with the worst performance are discarded.

The number of retained forecast models is controlled via ntop_pred. The user can choose whether to select this number, or leave the selection to the inbuilt optimization algorithm (in that case ntop_pred = NULL). If the optimization algorithm should select the best number of retained models, the user must select the optimization criterion: MAE, MAPE, or RMSE. After this trimming step, the weights, the intercept and the combined forecast are computed in the same way as in the bias-corrected eigenvector approach.

The bias-corrected trimmed eigenvector approach combines the strengths of the bias-corrected eigenvector approach and the trimmed eigenvector approach.

References

Hsiao, C., and Wan, S. K. (2014). Is There An Optimal Forecast Combination? Journal of Econometrics, 178(2), 294--309.

See Also

comb_EIG2 comb_EIG3 foreccomb, plot.foreccomb_res, summary.foreccomb_res, accuracy

Examples

Run this code
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,]

## Number of retained models selected by the user:
data<-foreccomb(train_o, train_p, test_o, test_p)
comb_EIG4(data, ntop_pred = 2, criterion = NULL)

## Number of retained models selected by algorithm:
data<-foreccomb(train_o, train_p, test_o, test_p)
comb_EIG4(data, ntop_pred = NULL, criterion = "RMSE")

Run the code above in your browser using DataLab