Basic Compare Means PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 Alison Kramer-Kuhn posted on Saturday, October 19, 2013 - 4:48 pm
Hello, I have what seems like it should be an easy problem to solve but I am still getting a handle of MPlus and I haven't had any luck figuring this out thus far. I am using a dataset that contains a "class" variable from a previously conducted LCA. I want to be able to find the means for each class (class 1, 2, and 3) on a set of continuous variables, and also indicate whether the differences in the means are significant.
Thank you!
 Bengt O. Muthen posted on Saturday, October 19, 2013 - 5:05 pm
You can do a multiple-group analysis where the class variable is group. In this analysis, the different means of the continuous variables can be given parameter labels and Model Test can be used to look for significant differences.
 Alison Kramer-Kuhn posted on Saturday, October 19, 2013 - 5:39 pm
Thank you for the quick reply. So if I were to take one continuous variable (VAR) as an example, I'd have:

grouping = class (1=X 2=Y 3=Z) ;

And I'm assuming this is type=basic, and would I need all of these steps?

Model:
Model X:
[VAR] (VARX)

Model Y:
[VAR] (VARY)

Model Z:
[VAR] (VARZ)

Model Constraint:
New(VARXvY) ;
VARXvY=VARX-VARY;
New(VARYvZ) ;
VARYvZ=VARY-VARZ;
New(VARXvZ) ;
VARXvZ=VARX-VARZ;

Model test:
VARXvY = 0;
VARYvZ = 0;
VARXvZ = 0;
 Linda K. Muthen posted on Sunday, October 20, 2013 - 11:26 am
Use only MODEL TEST. New parameters created in MODEL CONSTRAINT cannot be used in MODEL TEST.

MODEL TEST:
0 = varx - vary;
ETC.
 Alison Kramer-Kuhn posted on Sunday, October 20, 2013 - 12:23 pm
Thank you, that is helpful. The model runs and there are no error messages, but it seems to ignore the model test. Should I be looking for something other than a Wald test?
 Linda K. Muthen posted on Sunday, October 20, 2013 - 1:34 pm
Search the output for Wald. It should be with the other fit information.
 Alison Kramer-Kuhn posted on Sunday, October 20, 2013 - 2:45 pm
Hmm, It actually didn't have any fit information at all...I'm thinking that this was because I used type=basic so changed it to type=complex (what I've been using for other analyses).

I got a more detailed output with fit information. However, there is warning about standard errors being wrong because I'm using the useobservations option - it suggests switching to the subpopulation option, but doing this gets an error message stating you can't use subpopulation with multiple groups.

There's also a message that states, WALD'S TEST COULD NOT BE COMPUTED BECAUSE OF A SINGULAR COVARIANCE MATRIX.

Any ideas about how to resolve this, or if there's another way of going about getting the means for each class? Thanks so much for your time.
 Linda K. Muthen posted on Sunday, October 20, 2013 - 3:25 pm
The SUBPOPULATION option is not available for multiple groups. It is probably not necessary. Run each group separately using USEOBSERVATIONS in one analysis and SUBPOPULATION in another. Compare them. If the results are close, use USEOBSERVATIONS in the multiple group analysis.

If you then get an error message, send the output and your license number to support@statmodel.com.
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: