Adding Labels for Factors in the CFA ... PreviousNext
Mplus Discussion > Confirmatory Factor Analysis >
 Fred B. Bryant posted on Monday, September 20, 2010 - 12:43 pm
The Mplus manual explains how to add labels to measured variables in a CFA model. But I'm unable to determine how to add labels for the factors in the output for the CFA model.

For example, in a two-factor CFA model, what specific syntax would I use on the MODEL command to label f1 as "Internal" and f2 as "External"?

Thanks in advance for your help with this.
 Linda K. Muthen posted on Monday, September 20, 2010 - 2:35 pm
You would say



Mplus does not allow labels for either observed or latent variables. Observed variables are given names using the NAMES option of the VARIABLE command. Factors are named using the BY option of the MODEL command.
 Fred B. Bryant posted on Monday, September 20, 2010 - 7:19 pm
Eureeka! Now I see! I mistakenly thought that one had to use f1, f2, etc. as factor names, just as one refers to factors in LISREL as ksi1, ksi2, etc. by default. And for some reason, I myopically fixated on the original variable names in naming observed variables in Mplus. Clearly, the latent and observed variables assume whatever names you give them at the outset in Mplus. Duh!

Thank you for your patience in explaining the obvious to one who seems not to see it. I once was blind, but now I see; was lost, but now am found. Much obliged!
 krisitne amlund hagen posted on Tuesday, September 21, 2010 - 2:10 am
hello, For some reason Mplus never lets me create new variables using variables from the NAMES list coupled with some mathematical operators (this is explained in the manual on p. 466 in version 5, but it doesn't seem to work in practice). After the NAMES list I write
define: in100000= w1salary/100000;
MISSING ARE ALL (-999.00);
USEVARIABLES =in100000 v1 v2 v3

And I get the following error message:

*** ERROR in Define command
Error in assignment statement for MISSING

No matter where I move the define command (before or after USEVARIABLES or Missing or whereever) I get an error message.
 Linda K. Muthen posted on Tuesday, September 21, 2010 - 6:34 am
The new variables created in DEFINE should be placed at the end of the USEVARIABLES list after any original variables. The DEFINE command should come before or after the VARIABLE command not in the middle of it.
 krisitne amlund hagen posted on Wednesday, September 22, 2010 - 2:34 am
Dear Linda,
Thanks for your answer. I tried your suggestion (your first sentence), but that doesn't work either.
After the USEVARIABLES list, I write:
define: IN100000= w1salary/100000;

and then I get the following error message:

*** ERROR in MODEL command
Unknown variable(s) in an ON statement: IN100000

Why doesn't Mplus recognize this new variable that I've created?

Second, I don't understand what you mean when you write: 'The DEFINE command should come before or after the VARIABLE command not in the middle of it'. When you say VARIABLE command, are you talking about the combined command of both NAMESARE and USEVARIABLES?

The only reason I'm creating this new variable is that the original variable, w1salary, has values that Mplus doesn't seem to be able to handle. I get ********* instead of estimates, so I figured I'd make the values smaller by dividing it by 100000.
 Linda K. Muthen posted on Wednesday, September 22, 2010 - 5:34 am
Please send your full output and your license number to
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message