Example: Using Saved Coefficients to Score an External File (FACTOR command)
MATRIX.
GET A /FILE="fsc.sav".
GET B /FILE="ext_data_standardized.sav" /VAR=varlist.
COMPUTE SCORES=A*TRANSPOS(B).
SAVE SCORES /OUTFILE="scored.sav".
END MATRIX.
- This example scores an external file using the factor score coefficients from a previous analysis, say, upon original.sav.
- Factor score coefficients are read from fsc.sav into A.
- The data are read from ext_data_standardized.sav into B. The variable values in
the external file should be standardized. Note that if the values
in ext_data_standardized.sav are
standardized based upon the means and standard deviations of the unstandardized
values in ext_data.sav, and not
upon the means and standard deviations of values in original.sav, then this analysis will be different
from one in which original.sav and ext_data.sav are merged and
FACTOR
is run using theSELECT
subcommand with cases from original.sav selected for use in computing the correlation or covariance matrix.If there are missing values, add
/MISSING=OMIT
or/MISSING=0
to the secondGET
statement to remove cases with missing values or impute the mean (0, since the variables are standardized). - The scores are saved to scored.sav.