comb_OLS: Ordinary Least Squares Forecast Combination

Description Usage Arguments Details Value References See Also Examples

View source: R/comb_OLS.R

Description

Computes forecast combination weights using ordinary least squares (OLS) regression.

Usage

1

Arguments

x

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

Details

The function integrates the ordinary least squares (OLS) forecast combination implementation of the ForecastCombinations package into ForecastComb.

The OLS combination method (Granger and Ramanathan (1984)) uses ordinary least squares to estimate the weights, \mathbf{w}^{OLS} = (w_1, …, w_N)', as well as an intercept, b, for the combination of the forecasts.

Suppose that there are N not perfectly collinear predictors \mathbf{f}_t = (f_{1t}, …, f_{Nt})', then the forecast combination for one data point can be represented as:

y_t = b + ∑_{i=1}^{N} w_i f_{it}

An appealing feature of the method is its bias correction through the intercept – even if one or more of the individual predictors are biased, the resulting combined forecast is unbiased. A disadvantage of the method is that it places no restriction on the combination weights (i.e., they do not add up to 1 and can be negative), which can make interpretation hard. Another issue, documented in Nowotarski et al. (2014), is the method's unstable behavior when predictors are highly correlated (which is the norm in forecast combination): Minor fluctuations in the sample can cause major shifts of the coefficient vector (‘bouncing betas’) – often causing poor out-of-sample performance. This issue is addressed by the comb_LAD method that is more robust to outliers.

The results are stored in an object of class 'foreccomb_res', for which separate plot and summary functions are provided.

Value

Returns an object of class foreccomb_res with the following components:

Method

Returns the best-fit 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.

Intercept

Returns the intercept of the linear regression.

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.

References

Granger, C., and Ramanathan, R. (1984). Improved Methods Of Combining Forecasts. Journal of Forecasting, 3(2), 197–204.

Nowotarski, J., Raviv, E., Tr\"uck, S., and Weron, R. (2014). An Empirical Comparison of Alternative Schemes for Combining Electricity Spot Price Forecasts. Energy Economics, 46, 395–412.

See Also

Forecast_comb, foreccomb, plot.foreccomb_res, summary.foreccomb_res, accuracy

Examples

1
2
3
4
5
6
7
8
9
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_OLS(data)

ForecastComb documentation built on May 1, 2019, 9:16 p.m.