SF.PC {sufficientForecasting}R Documentation

Principal component regression for sufficient forecasting

Description

Principal component regression for sufficient forecasting

Usage

SF.PC(y, X, newX = NULL, K = "default", L = "default")

Arguments

y

Response, T by 1 matrix

X

Predictors, p by T matrix

newX

New predictors, a vector contains p entries (or NULL)

K

The number of common factors (default = obtained by getK)

L

The number of principal components used in the prediction, L is required to be no greater than K (default = K)

Value

Out-of-sample forecast for newX; or in-sample forecast for the last observed data point if newX is NULL

Examples

utils::data(dataExample,package = "sufficientForecasting")
SF.PC(dataExample$y,dataExample$X)

[Package sufficientForecasting version 0.1.0 Index]