FSCOR
Computes a set of factor scores given the factor score coefficient matrix.
Required Arguments
SCOEFNVAR by NF matrix containing the factor score coefficients as output from routine FCOEF. (Input)
XNOBS by NVAR data matrix for which factor scores are to be computed. (Input)
XBAR — Vector of length NVAR containing the means of the NVAR variables. (Input)
STD — Vector of length NVAR containing the standard deviations of the NVAR variables. (Input)
If STD(1) is not positive, then it is assumed that the factor score coefficients are from a covariance matrix and the observed variables are not standardized to unit variance.
SCORNOBS by NF matrix containing the factor scores. (Output)
If X is not needed, X and SCOR can share the same memory locations.
Optional Arguments
NVAR — Number of variables. (Input)
Default: NVAR = size (SCOEF,1).
NF — Number of factors. (Input)
Default: NF = size (SCOEF,2).
LDSCOE — Leading dimension of SCOEF exactly as specified in the dimension statement in the calling program. (Input)
Default: LDSCOE = size (SCOEF,1).
NOBS — Number of observations for which factor scores are to be computed. (Input)
Default: NOBS = size (X,1).
LDX — Leading dimension of X exactly as specified in the dimension statement in the calling program. (Input)
Default: LDX = size (X, 1).
LDSCOR — Leading dimension of SCOR exactly as specified in the dimension statement in the calling program. (Input)
Default: LDSCOR = size (SCOR,1).
FORTRAN 90 Interface
Generic: CALL FSCOR (SCOEF, X, XBAR, STD, SCOR [])
Specific: The specific interface names are S_FSCOR and D_FSCOR.
FORTRAN 77 Interface
Single: CALL FSCOR (NVAR, NF, SCOEF, LDSCOE, NOBS, X, LDX, XBAR, STD, SCOR, LDSCOR)
Double: The double precision name is DFSCOR.
Description
Routine FSCOR computes the factor scores from the factor score coefficient matrix. In FSCOR, the data are input as originally observed, and standardization is performed as required according to the value of STD(1). When the factor loadings are computed from the correlation matrix, the observed data must be standardized to a mean of zero and a variance of one prior to computing the factor scores. This requires that STD contain the observed standard deviations of the observed data and that XBAR contain the means. On the other hand, if the factor loadings are computed from the covariance matrix, then the observed data must be standardized to a mean of zero, but the variance must be left unchanged in computing the factor scores. In this case, STD(1) must be negative or zero.
After standardizing the observed data, the factor scores are computed as the product of the factor score coefficient matrix times the standardized data. If factor scores are computed from the same data from which the covariance matrix was computed, then the sample variance (using weights and frequencies as required) of the resulting factor scores will be 1.0.
Comments
Workspace may be explicitly provided, if desired, by use of F2COR/DF2COR. The reference is
CALL F2COR (NVAR, NF, SCOEF, LDSCOE, NOBS, X, LDX, XBAR, STD, SCOR, LDSCOR, WK)
The additional argument is
WK — Work vector of length NVAR.
Example
The following example is a continuation of the example given in the manual document for routine FACTR. The rotated loadings are those obtained from the manual document for routine FROTA, and the factor score coefficients are as described in the manual document for routine FCOEF.
 
USE FSCOR_INT
USE WRRRN_INT
 
IMPLICIT NONE
INTEGER LDSCOE, LDSCOR, LDX, NF, NOBS, NVAR
PARAMETER (LDSCOE=2, LDSCOR=5, LDX=5, NF=1, NOBS=5, NVAR=2)
!
REAL SCOEF(NVAR,NF), SCOR(LDSCOR,NF), STD(NVAR), X(LDX,NVAR),&
XBAR(NVAR)
!
DATA X/40.0, 60.0, 30.0, 15.0, 45.0, 3.0, 9.0, 2.0, 0.0, 4.0/
DATA SCOEF/0.33563, 0.33562/
DATA XBAR/38.0, 3.6/, STD/16.80774, 3.361547/
!
CALL FSCOR (SCOEF, X, XBAR, STD, SCOR)
!
CALL WRRRN ('Factor Scores', SCOR)
END
Output
 
Factor Scores
1 -0.0200
2 0.9785
3 -0.3195
4 -0.8187
5 0.1797
Published date: 03/19/2020
Last modified date: 03/19/2020