Description Usage Arguments Details Value Author(s) References See Also Examples
This function generates forecast combination results using Bates-Granger (BG) method, without considering the correlations between candiate forecasts.
1 |
X |
Matrix of candidate forecasts for observed series. |
y |
Observed series. |
Xnew |
Matrix of candidate forecasts for unobserved series. |
ynew |
(Optional) True values of unobserved series, usually supplied for testing forecast accurary. If |
n0 |
Number of “burn-in” observations for BG. |
rhos |
A vector of discount parameters. |
This function generates forecasts from the BG method.
A matrix with combined forecasts (both fitted values from X
and prediction from Xnew
)
Wei Qian, Craig A. Rolling, Gang Cheng and Yuhong Yang
Maintainer: Wei Qian <weiqian@udel.edu>
Qian, W., Rolling, C. A., Cheng, G., and Yang, Y. (2021), “Combining Forecasts for Universally Optimal Performance”, International Journal of Forecasting, to appear.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(AIafter)
data(rgdp)
# observed series and its candidate forecasts
neval <- 20
n <- nrow(rgdp)
y <- rgdp[1:(n-neval),1]
X <- rgdp[1:(n-neval),-1]
# candidate forecasts for unobserved series
Xnew <- rgdp[(n-neval+1):n,-1]
# generate forecasts by BG (both fitted and predicted values)
fcst <- BG1(X,y,Xnew)
# true values of unobserved series
ynew <- rgdp[(n-neval+1):n,1]
# generate forecasts by BG (usually used for evaluation of forecast accuracy)
fcst <- BG1(X,y,Xnew,ynew)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.