Calculate factor scores or factor-score coefficients for the latent variables in a structural-equation model.
# 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, ...)
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.
an object of class "sem"
or "msem"
, produced by the sem
function.
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.
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.
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.
John Fox jfox@mcmaster.ca
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.
Bollen, K. A. (1989) Structural Equations With Latent Variables. Wiley.
sem
, scale