powered by
Principal component regression for sufficient forecasting
SF.PC(y, X, newX = NULL, K = "default", L = "default")
Out-of-sample forecast for newX; or in-sample forecast for the last observed data point if newX is NULL
newX
NULL
Response, T by 1 matrix
Predictors, p by T matrix
New predictors, a vector contains p entries (or NULL)
The number of common factors (default = obtained by getK)
getK
The number of principal components used in the prediction, L is required to be no greater than K (default = K)
K
utils::data(dataExample,package = "sufficientForecasting") SF.PC(dataExample$y,dataExample$X)
Run the code above in your browser using DataLab