Learn R Programming

tsfa (version 2021.1-3)

predict: Predict Factor Scores from an Object.

Description

Predict factor scores using the predictor from object.

Usage

# S3 method for FAmodel
predict(object, 
           data = NULL, factorNames.=factorNames(object), ...)
    # S3 method for TSFmodel
predict(object, 
           data = object$data, factorNames.=factorNames(object), ...)

Arguments

object

an object from which a matrix (predictor) can be extracted to apply to the data.

data

data to which the predictor should be applied.

factorNames.

names to be given to the calculated predicted factor scores.

...

additional arguments currently unused.

Value

Predicted factor scores.

Details

If data 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 data %*% t(LB), where LB is the factor score predictor 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