The default in Mplus is to estimate the model using all available information and missing data estimation. Therefore, all observations receive a factor score. For listwise deletion, add LISTWISE=ON; to the DATA command.
Factor scores are not the same as the factors in a model. How close they are to each other can be seen in the factor determinacy score. See the FSDETERMINACY option of the OUTPUT command.
Thank you! One follow up question. If I have 5 measures and am creating a latent variable and then using that latent variable in subsequent analyses with other latent variables would the model use the same factor scores as I would receive in the fscores output? Is that what you meant by the factor scores are not the same as the factors in the model? For example, if I created a mean composite of the 5 measures would that differ the fscores output?
To clarify further: I am doing a 4 latent variable cross lagged analysis in mplus but first doing CFA analyses on each of the 4 variables. Would the fscores data be the same as what is being used in this 4 latent variable cross lagged analysis? I would like to extract the same data without measurement error. Is that possible? Thank you again!
Sorry if that was unclear. I am doing a basic 1-Factor CFA using 5 measures. When using the SAVE Fscores option, I am wondering whether the factor scores that are saved are free from measurement error. Thank you!
Factor scores can be seen as free of measurement error, but are not free of estimation error. Estimated factor scores do not behave as true factors (give different variances and relations to other variables) unless you have many good indicators. See for instance
Skrondal, A. and Laake, P. (2001). Regression among factor scores. Psychometrika 66, 563-575.
Hi, I've just spent hours trying to save my factor scores through the MFILE command of the SAVEDATA function. I can save the factor scores no problem but I can't seem to get the factor scores to be merged back into the original dataset. Even trying to take them into SPSS was a problem with the factor scores being saved over three columns/variables. With MFILE, should I be nominating the original dataset that I want to merge the factor scores into? Regards, Joanne
Hi Linda, can you tell me what is wrong in my Mplus script below, such that I get the error message at the bottom of this section of text? I was relying on p. 404 of the current Mplus manual as an example.
This script begins at the ANALYSIS line of my program, to save space.
ANALYSIS: TYPE = BASIC;
SAVEDATA: MFILE = FACTORSCORES.DAT; MNAMES ARE H4MH3R H4MH4R H4MH5R H4MH6R H4PE37R H4PE38R H4PE39R H4PE40R H4PE41R AID GENERAL CONCRETE;
MFORMAT IS 9F10.3 I9 2F10.3;
MSELECT ARE GENERAL CONCRETE;
MMISSING = H4MH3R H4MH4R H4MH5R H4MH6R H4PE37R H4PE38R H4PE39R H4PE40R H4PE41R AID GENERAL CONCRETE (. *);
FILE IS MERGED.sav; FORMAT IS FREE; MISSFLAG = .;
*** ERROR in SAVEDATA command Unknown option: MFILE
Hi Linda, I took the advice of you and Jon Heron above, and saved the factor scores using the SAVE=FSCORES command, and selected other variables that I wanted in the saved data set using the AUXILIARY option.
But when I work with the newly created data set, factorscores_022312.dat, I get the message. Why would this be?
*** ERROR The number of observations is 0. Check your data and format statement. Data file: D:\AH\locker\factorscores_022312.dat *** ERROR Non-missing blank found in data file at record #1, field #: 18
Hi Linda, thanks for all of your help. What does it mean that Mplus saved two versions of my latent variables in the DAT file with the fscores: GENERAL F10.3 GENERAL_SE F10.3 CONCRETE F10.3 CONCRETE_SE F10.3
Mplus 6.12 does not have that, but if you use ML you can get that information via the information curve that you get in the PLOT command. One divided by the square root of the information value is the SE for the factor score at that factor value.
Franziska posted on Tuesday, May 06, 2014 - 9:02 am
Dear Drs. Muthén, I do have the same problem that has been posted by Joanne Bradbury on Thursday, February 16, 2012 - 3:35 pm I have also spent hours trying to save my factor scores back into the original dataset through "just" the SAVE = FSCORES command. However, the output then tells me that this command is ignored as there is no datafile specified. What am I doing wrong? Thanks for answering! Franziska
You need to use the FILE option of the SAVEDATA command with SAVE=FSCORES. See the SAVEDATA command in the user's guide.
Franziska posted on Thursday, May 08, 2014 - 9:16 am
Hi Linda, this is what I have done: Title:ESEM Germany 05 - Model 2: Invariance 8 factors, factorscores Data: File is "C:\Users\wma117\Desktop\GERMANY_complete5.dat"; LISTWISE = ON; Variable:Names are id br y co ca loc know es rel a1 a2 b1.....in1; [had do delete it due to message size] CATEGORICAL ARE a1-in1; USEVARIABLES = a1-in1; Missing are all (-66); GROUPING IS loc (0=loc 1=glob); MODEL: f1-f8 BY a1-in1(*1); ANALYSIS: PARAMETERIZATION = THETA; ITERATIONS = 10000; SAVEDATA: FILE IS GERMANY_complete5.dat; SAVE = FSCORES; OUTPUT: Standardized (STDYX)cinterval;
This was to try to save the factor scores into the original dataset to work with this afterwards. However, now the output says: *** ERROR The number of observations is 0. Check your data and format statement.
The dataset is fine. If I save the factorscores in a new dataset, everything runs smoothly.
Hi Linda 1. Could please be kind and post the solution to Yandell's MISSFLAG error above (post Feb 28 2012)? 2. How I can save all the records from the input dataset when I save the Fscores, even though these are considered missing on all values (listwise is off)? 3. Why doesn't the savedata FORMAT IS function work; neither with spaces or commas between? Tried both Demo (mine) and full (campus) version of Mplus 7.2 [...] Savedata: File = Inquiry2.dat; Save = Fscores; Missflag = -9; Format = 4F1.0 F5.3 2F8.0 F5.3 2F8.0; ! Format = 4F1.0, F5.3, 2F8.0, F5.3, 2F8.0; *** ERROR in SAVEDATA command Unknown option: Missflag-9 Order and format of variables I1 4F1.0 I2 4F1.0 I3 4F1.0 I4 4F1.0 SCIWGT 4F1.0 IDTEACH2 4F1.0 IDSTUD2 4F1.0 INQUIRY 4F1.0 STRATUM2 I8 TEACHID I8 Save file format 84F1.0 2I8