Learn R Programming

GeomComb (version 1.0)

comb_MED: Median Forecast Combination

Description

Computes a ‘combined forecast’ from a pool of individual model forecasts using their median at each point in time.

Usage

comb_MED(x)

Arguments

x
An object of class foreccomb. Contains training set (actual values + matrix of model forecasts) and optionally a test set.

Value

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

Details

Suppose $y_t$ is the variable of interest, there are $N$ not perfectly collinear predictors, $\mathbf{f}_t = (f_{1t}, \ldots, f_{Nt})'$. For each point in time, the median method gives a weight of 1 to the median forecast and a weight of 0 to all other forecasts, the combined forecast is obtained by:

$$\hat{y}_t = {median(\mathbf{f}_{t}})$$

The median method is an appealing simple, rank-based combination method that has been proposed by authors such as Armstrong (1989), McNees (1992), Hendry and Clements (2004), Stock and Watson (2004), and Timmermann (2006). It is more robust to outliers than the simple average approach.

References

Armstrong, J. S. (1989). Combining Forecasts: The End of the Beginning or the Beginning of the End?. International Journal of Forecasting, 5(4), 585--588.

Hendry, D. F., and Clements, M. P. (2004). Pooling of Forecasts. The Econometrics Journal, 7(1), 1--31.

McNees, S. K. (1992). The Uses and Abuses of 'Consensus' Forecasts. Journal of Forecasting, 11(8), 703--710.

Stock, J. H., and Watson, M. W. (2004). Combination Forecasts of Output Growth in a Seven-Country Data Set. Journal of Forecasting, 23(6), 405--430.

Timmermann, A. (2006). Forecast Combinations. In: Elliott, G., Granger, C. W. J., and Timmermann, A. (Eds.), Handbook of Economic Forecasting, 1, 135--196.

See Also

foreccomb, plot.foreccomb_res, summary.foreccomb_res, comb_SA, 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,]

data<-foreccomb(train_o, train_p, test_o, test_p)
comb_MED(data)

Run the code above in your browser using DataLab