Learn R Programming

sem (version 3.1-16)

fscores: Factor Scores for Latent Variables

Description

Calculate factor scores or factor-score coefficients for the latent variables in a structural-equation model.

Usage

# S3 method for sem
fscores(model, data=model$data, center=TRUE, scale=FALSE, ...)
# S3 method for msem
fscores(model, data=model$data, center=TRUE, scale=FALSE, ...)

Value

Either a matrix of estimated factor scores (if the data argument is supplied) or a matrix of factor-score coefficients (otherwise). In the case of an "msem"

argument, a list of matrices is returned.

Arguments

model

an object of class "sem" or "msem", produced by the sem function.

data

an optional numeric data frame or matrix containing the observed variables in the model; if not NULL, the estimated factor scores are returned; if NULL, the factor-score coefficients are returned. The default is the data element of model, which is non-NULL if the model was fit to a data set rather than a covariance or moment matrix.

center

if TRUE, the default, the means of the observed variables are subtracted prior to computing factor scores. One would normally use this option if the model is estimated from a covariance or correlation matrix among the observed variables.

scale

if TRUE, the possibly centered variables are divided by their root-mean-squares; the default is FALSE. One would normally use this option if the model is estimated from a correlation matrix among the observed variables. Centering and scaling are performed by the scale function.

...

arguments to pass down.

Author

John Fox jfox@mcmaster.ca

Details

Factor-score coefficients are computed by the “regression” method as \(B = C^{-1} C^{*}\), where \(C\) is the model-implied covariance or moment matrix among the observed variables and \(C^{*}\) is the matrix of model-implied covariances or moments between the observed and latent variables.

References

Bollen, K. A. (1989) Structural Equations With Latent Variables. Wiley.

See Also

sem, scale