Learn R Programming

tsfa (version 2006.2-1)

predict: Predict Factor Scores from an Object.

Description

Predict factor scores using the predictor from object.

Usage

## S3 method for class 'TSFmodel':
predict(object, 
           newdata = NULL, factorNames.=factorNames(object), ...)
    ## S3 method for class 'TSFestModel':
predict(object, 
           newdata = NULL, factorNames.=factorNames(object), ...)

Arguments

object
an object from which a matrix (predictor) can be extracted to apply to the data.
newdata
data to which the predictor should be applied.
factorNames.
names to be given to the calculated predicted factor score series.

Value

  • Predicted factor scores series.

Details

If newdata is not supplied then it is extacted from object if possible (which is normally the data the model was estimated with), and otherwise an error is indicated. The predicted factor scores are given by newdata %*% t(LB), where LB is the factor score coefficient matrix extracted from object. This is the Barlett factor score coefficient matrix if TSFmodel or TSFestModel objects were estimated with estTSF.ML.

See Also

predict, factors, factorNames, TSFmodel