Uses the diffusion index approach of Stock and Watson to compute out-of-sample forecasts
SWfore(y, x, orig, m)
The scalar variable of interest
The data matrix (T-by-k) of the observed explanatory variables
Forecast origin
The number of diffusion index used
Regression coefficients of the prediction equation
Predictions at the forecast origin
Mean squared errors, if available
Loading matrix
Diffusion indices
Performs PCA on X at the forecast origin. Then, fit a linear regression model to obtain the coefficients of prediction equation. Use the prediction equation to produce forecasts and compute forecast errors, if any. No recursive estimation is used.
Tsay (2014, Chapter 6). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.