CFA with dichotomous outcome PreviousNext
Mplus Discussion > Confirmatory Factor Analysis >
Message/Author
 Anna Westin posted on Tuesday, December 13, 2011 - 6:06 am
Hello, I am running a CFA with a dichotomous outcome, a number of continuous study variables, and one categorical covariate. It is my understanding that I need to indicate that the outcome is CATEGORICAL under the variable statement, but only for the outcome, and not the covariate? Also, when I run the syntax, the model has problems running with certain data files, that are not an issue if I treat the outcome as continuous (i.e., remove the CATEGORICAL = y1; statement). It states that it needs individual data when I use a txt correlation type file, but also has difficulties running with raw data in a .dat file. Can you explain why this is? I want to make sure I am not missing another error in my syntax as these data warnings come up. Other than including the CATEGORICAL statement, are there any other statements that should be included when running a CFA (that runs fine as continuous) such as a change in ANALYSIS statement? I really appreciate your assistance.
 Linda K. Muthen posted on Tuesday, December 13, 2011 - 9:52 am
No other changes should be needed. You do need individual data for categorical. Please send the output that shows the problem and your license number to support@statmodel.com.
 Anna Westin posted on Tuesday, December 13, 2011 - 11:12 am
Thank you. I have been able to run this some times but not other times depending on the file type and am just curious what I am doing wrong for the times it does not work. The error messages received tend to be the ones pasted below. I'd be interested to know what they mean if you have an idea.
Thanks!

*** ERROR
The number of observations is 0. Check your data and format statement.
Data file: DATA.dat
*** ERROR
Invalid symbol in data file:
"Y1" at record #: 1, field #: 1
 Linda K. Muthen posted on Tuesday, December 13, 2011 - 12:29 pm
You have the variable names as the first record of the data set. Remove the variable names.
 Anna Westin posted on Tuesday, December 13, 2011 - 5:46 pm
Thank you! That explains why it worked with one data set but not another.

Best,
Anna
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: