SEM error message PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Zhi Lin posted on Tuesday, May 19, 2009 - 8:30 am
Dear Dr. Muthen,

I am still new to M-plus. I was trying to run SEM analysis using the following code, but I received an error message “Invalid class value”. f1-f3 are latent variables, x1-x5 are categorical indicators with binary outcomes, sex and affect are also binary, age is continuous. There are correlations between x1, x2, x3, and x4 and x5. I don’t know whether WITH is the right command. Appreciate if you could point out what goes wrong in the code.

TITLE: CVD Data

DATA: File is "C:\Documents and Settings\jc\My Documents\data\cvd.csv";

VARIABLE: Names are sex affect age x1 x2 x3 x4 x5

Categorical are sex affect x1 x2 x3 x4 x5;
Missing=ALL (999);

ANALYSIS: Estimator = MLR;
Type=General;

MODEL: f1 BY x1@1 x2 x3;
#x1 WITH x2;
#x2 WITH x3;
f2 BY x4@1 x5;
#x4 WITH x5
f3 by sex@1 age affect;
f3 on f1 f2;


OUTPUT: TECH1 TECH8;


*** ERROR
Invalid class value

Many thanks
Zhi
 Linda K. Muthen posted on Tuesday, May 19, 2009 - 7:24 pm
Why do you put # in front of x1, x2, and x4. This is not correct.
 Zhi Lin posted on Tuesday, May 19, 2009 - 8:01 pm
It was a silly mistake that I found out earlier as I tried to comment out the input lines. Anyway, I'd like to measure the correlation between the factor indicators, (ie. x1,x2 and x3). Is WITH the correct input for that.
Thanks!

zhi
 Linda K. Muthen posted on Wednesday, May 20, 2009 - 5:47 am
WITH statements are used to specify covariances and residual covariances.
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: