SWfore | R Documentation |
Uses the diffusion index approach of Stock and Watson to compute out-of-sample forecasts
SWfore(y, x, orig, m)
y |
The scalar variable of interest |
x |
The data matrix (T-by-k) of the observed explanatory variables |
orig |
Forecast origin |
m |
The number of diffusion index used |
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.
coef |
Regression coefficients of the prediction equation |
yhat |
Predictions at the forecast origin |
MSE |
Mean squared errors, if available |
loadings |
Loading matrix |
DFindex |
Diffusion indices |
Ruey S. Tsay
Tsay (2014, Chapter 6). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.