IRT latent class (mixture) modeling... PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
 bmuthen posted on Saturday, July 16, 2005 - 1:16 am
I am posting this on behalf of someone who emailed me - it might be of general interest.

I was wondering if and how the following task can be handled in Mplus:
I want to estimate the class size parameters with Mplus in such a way that
they approach the class sizes of a specific data set (in order to show that
my model is well suited for clustering). The data set was generated using a
mixed Rasch Model for ordinal, equidistant rating data (3 classes were
assumed); this was done in R.
Using this input data in Mplus, the objective is to obtain three
substantially different item profiles for the three classes. I would like to
show that group membership is only influenced by the specific item profiles
and not by an underlying continuous trait (that can cause profiles to shift
either upward or downward in a parallel way, depending on the value of the
trait). Thus, if the profile of one class shifted upward or downward in a
parallel way the cases would remain in the same class.

The model used for generating the data is: exp(x*theta - x*sigma -
x*(x-m)*0.5*delta)/sum(exp(x*theta - x*sigma - x*(x-m)*0.5*delta))

Is there a way of specifying the assumed equidistant Rasch Model in Mplus
and how do I do that? How would I have to specify this in the model command
of Mplus?
Is it correct to assume that I would need to apply a model with 2 latent
variables (the continuous trait variable f, and the categorical class
variable c)? Or would I have to consider further latent variables? How do I
take the continuous latent variable into account in my model?

I would much appreciate your opinion and support in this matter. Thank you
very much.

Best regards,

PS: More detail about the generated sample data: The sample size is 5000
with 25 variables. The first variable is a continuous score of an assumed
latent trait, for which normal distribution is assumed with the same mean
for all three classes, and different standard deviations in the three
classes. Variables 2 to 25 are categorical (ordinal) items on a
multi-categorical scale.
 bmuthen posted on Saturday, July 16, 2005 - 1:21 am
It sounds like what you want to do is related to mixture (latent class) modeling in an IRT context (continuous underlying factors) with polytomous, ordered categorical outcomes. So you are right that you use a combination of a continuous (f, say) and categorical (c, say) latent variable. This is possible in Mplus. The version 3 User's Guide has several related examples that you can piece together to get what you want. You can start with ex 7.17 and then combine that with categorical outcomes. And note that I think you want the latent class variable c in 7.17 to point to each item - not only the factor (changing the factor means) - so that you get the item probabilities changing across classes. You can also have the loadings be different across classes. I have recently experimented with similar "factor mixture" models for binary items. Make sure you request Tech1 so that you see that you get the parameters you want, starting with miter=1 to check your setup.
 Anonymous posted on Monday, July 18, 2005 - 1:48 pm
Thanks for your response. I am glad to hear that I seem to be on the right track. I used ex 7.17 as a starting point and experimented with the model. I wanted to let the latent class variable c point to each item. Therefore I used the following Model command:
f BY y2-y25;
f ON c#1;
f ON c#2;
f ON c#3;

However, I am not sure if I am modelling what I am intending to do. Actually, I wanted to replace the part "%c#1% [y2$1-y25$1]" by the following expression:
but was given an error report that the model could not be run. What is wrong about the expression?

My other question concerns the parameters in the Tech1 output. I used the Mplus users guide to learn about the interpretation of outputs. However, I noticed that I am having difficulties in assessing whether these parameters represent the ones I am looking for. Do you have any advice on how to tackle this?
 bmuthen posted on Monday, July 18, 2005 - 11:28 pm
I think you are using "f ON c#" to try to make the f means change over classes. However, f mean differences across classes is not done by regression but simply using [f] within each class (except one class that has to have [f@0] for identification) - this, however, is the default in Mplus so you don't have to say anything in this regard.

With a categorical variable y you say [y$1] and with a continuous variable you say [y]. This is described in the User's Guide.
 Anonymous posted on Wednesday, July 20, 2005 - 11:21 am
Concerning the means across classes, I assume that the mean will be the same across classes. Would I specify this by saying [f@”value of assumed mean”] in the following model for each class model?

f BY y2-y25;




How could I specify my assumption of different standard deviation values in each of the three classes? Would I have to include the expression f@”value of assumed SD in class i” in each of the three class models?

When trying to run the model, the following error report was generated:
*** ERROR in Model command
Ordered thresholds 1 and 2 for class indicator Y2 are not
increasing. Check your starting values.
*** ERROR in Model command
Ordered thresholds 1 and 2 for class indicator Y7 are not
increasing. Check your starting values.
*** ERROR in Model command
Ordered thresholds 1 and 2 for class indicator Y15 are not
increasing. Check your starting values.

What action should I take concerning the starting values?

 bmuthen posted on Wednesday, July 20, 2005 - 1:27 pm
If you want the factor mean to be the same across classes, you can say

[f] (1);

in the Overall part of the model, or have this same statement in each class.

Different variances of f in the classes is accomplished by saying


in each class.

Your threshold problem is because you want thresholds to vary across class (by mentioning them within each class), but for each variable you should refer to all thresholds, not just the first (there are as many as C-1 thresholds for a C-category variable). If need be, you can give rough start values that are higher for the second category (assuming C=3) than for the first, using expressions like

[y$1*0 y$2*.5];
 Anonymous posted on Wednesday, July 20, 2005 - 8:17 pm
Computing time is quite high for the above model. I was wondering how I can obtain a graphical presentation of the class specific item profiles. (#1) Is this feasible in Mplus?

(#2) Will TECH4 also provide estimated standard deviations besides means, covariances and correlations for the latent variables?

I read in the user´s guide that plots can be generated for the total sample, by group, by class etc. I´m not clear about how I specify this. This question also links to questions #1 and #2. I would like to obtain standard deviations for my three classes respectively.
 bmuthen posted on Wednesday, July 20, 2005 - 8:42 pm
Yes, factor mixture models with categorical outcomes require quite heavy calculations.

1. Yes, you use the Mplus graphics part by using the Mplus PLOT command:

type = plot3;
series = u1-u10(*);

2. No

3. You may want to experiment with the graphics module of Mplus. If unclear, please send question to
 Rick Sawatzky posted on Tuesday, June 03, 2008 - 4:10 pm
I am fitting an polytomous unidimensional IRT mixture model (using MPlus 5.1 - as in ex.7.27 but with oridinal variables) and requested savedate = cprob. I have three questions:
(1) Is the "F" column in the saved data file the expected a posteriori factor score?
(2) What is the difference between the "F" and "C_F" columns?
(3) Is it possible to save the maximum likelihood scores?
Thank you!
 Linda K. Muthen posted on Tuesday, June 03, 2008 - 5:07 pm
1. Yes.
2. C-F is for most likely class membership.
3. No.
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