SAVEDATA factor score PreviousNext
Mplus Discussion > Confirmatory Factor Analysis >
Message/Author
 Sunny Shin posted on Thursday, February 11, 2010 - 12:39 pm
Hi Linda,

Somehow, mplus doesn't save a factor score. here is my input. I appreciate your help in advance.

TYPE = IND;


VARIABLE: NAMES = AID PSUSCID REGION GSWGT1 H1PF16 H1PF20R H1PF14R H1PF18R
H1PF19R H1PF21R H1FS5R H1ED16R H1ED17R;

USEVARIABLES = H1PF20R H1PF18R H1PF19R H1PF21R H1FS5R H1ED16R H1ED17R;

IDVARIABLE = AID;
MISSING = ALL (-999);
CLUSTER = PSUSCID;
STRATIFICATION = REGION;
WEIGHT = GSWGT1;

ANALYSIS: TYPE = COMPLEX;

MODEL: planful BY H1PF18R H1PF19R H1PF20R H1PF21R;
distract BY H1ED16R H1FS5R H1ED17R;

OUTPUT: STANDARDIZED MODINDICES (4);

SAVEDATA: FILE IS CFA_SR.sav;
SAVE IS fscores;
FORMAT IS free;
 Sunny Shin posted on Thursday, February 11, 2010 - 1:02 pm
I just found that fscores is not supported in Type = complex. Thanks.
 Linda K. Muthen posted on Thursday, February 11, 2010 - 5:42 pm
Mplus does provide factor scores with TYPE=COMPLEX.
 Cecile Marguerite Povel posted on Wednesday, June 08, 2011 - 11:54 am
Dear Linda,

In SAS it is possible to extract “latent variable score regression coefficients”. In SAS these coefficients are used to calculate a factor score. Is it also possible in MPLUS to extract “latent variable score regression coefficients”?
 Linda K. Muthen posted on Wednesday, June 08, 2011 - 1:39 pm
See the FSCOEFFICIENT option of the OUTPUT command.
 Cecile Marguerite Povel posted on Wednesday, June 15, 2011 - 1:16 am
Dear Linda,

Thanks for your answer!

I am trying to compare the way SAS and MPLUS calculate factor scores. Both use the regression method and the parameter estimates and fscoefficients are the same for both programs. In both programs the fscoefficients are multiplied with standardized observations. To mean it seems that in SAS observations are standardized as ((obs-means)/sd)), whereas in MPLUS they are standardized as(obs-means). Do you know what the advantages are of the different standardization methods?

Cecile
 Tihomir Asparouhov posted on Wednesday, June 15, 2011 - 2:23 pm
Cecile

Your understanding of Mplus is correct. In principle it doesn't matter what standardization is used as long as it implies the correct factor score (posterior mean). However from your information above it seems that you would get different results in the two programs. You should make sure that the factors scores you get agree with those computed by Mplus using the savedata command.
savedata: save=fs; file=...;

Tihomir
 Cecile Marguerite Povel posted on Thursday, June 16, 2011 - 3:27 am
Dear Tihomor,

Thanks for your explanation. Bij default sas uses a prior distribution to calculate a factor score. If I understand you well Mplus uses a posterior distribution to calculate factor scores.

With the "prior distribution approach" I used the following strategy. 1) I calculated a factor score for controls.
2) I calculate a factor score for cases using the factor score coefficients for controls multiplied by observations which were standardized according to the
distribution in controls (so I used mean + sd values of controls to standardize the distribution)

Is such an approach also possible when using a posterior distribution? If yes, how can I extract the posterior mean + sd from MPLUS?
 Bengt O. Muthen posted on Thursday, June 16, 2011 - 9:46 am
Here are a couple of clarifying points. Mplus also uses a prior distribution - a normal distribution. The standard regression method of computing factor scores gets the estimates from the peak of the posterior. So in this regard, there seems to be no differences between SAS and Mplus.

I don't understand your 1) and 2) steps. You mention "controls" - is that a certain group and you also have other groups? If you have several groups, it seems like there is a better approach that can be used.
 benedetta posted on Tuesday, January 20, 2015 - 4:36 am
Dear professors,

I would like to compare factor score estimates for two different CFA models, the first using WLSMV estimator, the second MLR with Monte Carlo integration. I run the analysis and saved the factor scores for each model
SAVEDATA:
FILE IS CFA_montecarlo.sav;
SAVE IS fscores;
FORMAT IS free;
I did not get any warning message, but apparently Mplus does not save the factor scores for the second model. Can it depend on the fact that I am using Monte Carlo integration?

Thank you in advance
 Bengt O. Muthen posted on Tuesday, January 20, 2015 - 2:00 pm
Please send the two outputs to Support along with your license number.
 Roni Mermelshtine posted on Monday, August 17, 2015 - 2:13 pm
Dear Linda and Bengt

I am running a CFA with 15 categorical variables, extracting 4 latent factors, using the WLSMV estimator.

I am trying to save the factor scores as such:

SAVEDATA: FILE IS fscores.dat;
SAVE=FSCORES;

A .dat file is being produced but actual factors scores are not being extracted, instead the .dat file contains the values of the 15 categorical variables that make up the latent factors.
When I specified the factor names by adding FSCORES= F1 F2 F3 F4; I was asked to run the analysis with the BAYES estimator. Once I run this analysis I received the following error message: 'The syntax for the FILE option has changed. Please refer to the Mplus User's Guide for available options.'

I am not quite sure how to proceed and would appreciate your help very much.

Best wishes
Roni
 Linda K. Muthen posted on Monday, August 17, 2015 - 2:37 pm
Please send the full output with FSCORES not FSCORES=f1 etc. and your license number to support@statmodel.com.
 Carlo Pulcini posted on Tuesday, July 05, 2016 - 3:01 am
Dear Professors,
I am having the same issue as benedetta had back in 01/20/2015:

at the end of my input program I have the savedata section

SAVEDATA:
RESULTS = Subj_fit.dat;

SAMPLE = Subj_corr.dat;
TYPE = CORR;

FILE = Subj_fs.dat;
!SAVE = FS;

Everything works fine but as soon as I drop the "!" and ask also for SAVE = FS; no output nor error is produced and Subj_fs.dat is an empty file...
Any suggestion?

Thank you in advance,
Carlo Pulcini
 Linda K. Muthen posted on Tuesday, July 05, 2016 - 10:58 am
Please send your input, data, output, and your license number to support@statmodel.com.
 Stephanie Mazzucca posted on Thursday, March 01, 2018 - 12:01 pm
Hi Drs. Muthen,

I'm new to confirmatory factor analysis and was hoping to learn more about how MPlus calculates factor scores for an analysis with categorical indicators. Are factor scores standardized to a normal distribution? The factor scores exported from my analysis are not perfectly normal. This isn't problematic for our project, but I am worried I've done something wrong in my analysis.

Thanks so much. Cheers,
Stephanie Mazzucca
 Bengt O. Muthen posted on Thursday, March 01, 2018 - 6:24 pm
The computation is different for ML and WLSMV but for the latter see the technical appendix corresponding to version 2 on our website at

http://www.statmodel.com/download/techappen.pdf

The factor scores are not standardized to a normal distribution bit their computation builds on a model that specifies a normal distribution for the factors.
 ZHANG Liang posted on Wednesday, July 17, 2019 - 8:36 pm
Dear Muthen:
I found something strange to me. I modified the model 5.6 in User's guide example V7.0, like this:

MODEL:
f1 by y1-y3;
f2 by y4-y6;
f1 with f2 @0;
SAVEDATA:
file = factorscore.dat;
save = fscores;

(estimator is the default ML)

F1 and F2 were set to be orthogonal, uncorrelated with each other. However, I found their factor scores were still significantly correlated (.28 ***), though not as strong as when "f1 with f2@0;" was freed (.34 ***).

How should I understand this contradiction? Thank you!
 Bengt O. Muthen posted on Thursday, July 18, 2019 - 6:23 am
This is a well-known issue. See the FAQ on our website:

Factor scores
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: