
Message/Author 

Zhi Lin posted on Tuesday, May 19, 2009  8:30 am



Dear Dr. Muthen, I am still new to Mplus. I was trying to run SEM analysis using the following code, but I received an error message “Invalid class value”. f1f3 are latent variables, x1x5 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 


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 


WITH statements are used to specify covariances and residual covariances. 

Back to top 

