Complex mixture (multilevel growth mi... PreviousNext
Mplus Discussion > Growth Modeling of Longitudinal Data >
 Dave Flora posted on Friday, March 28, 2003 - 11:19 am
I would like to estimate a growth mixture model with clustered data. The Addendum to the Mplus User's Guide suggests this is possible with TYPE = COMPLEX MIXTURE. However, I'm unclear on the correct syntax for the MODEL commands, specifically with respect to integrating the %WITHIN% and %BETWEEN% statements with the %OVERALL% and specific class portions of the model. For now I am just trying to get a one-class model to get the syntax right.
My (simplified) code is like this:
USEVARIABLES ARE family y1-y5;
cluster = family;
classes = c(1);
type = complex mixture;
iw by y1-y5@1;
sw by y1@0 y2@1 y3@2 y4@3 y5@4;
ib by y1-y5@1;
sb by y1@0 y2@1 y3@2 y4@3 y5@4;
[y1-y5@0 ib sb];

This leads to an error message about the %within% statement being illegal.
I realize this is a new method for Mplus and appreciate the many capabilites of the software -- thanks for any and all help!
 Linda K. Muthen posted on Friday, March 28, 2003 - 11:31 am
TYPE=COMPLEX MIXTURE is not the same as TYPE=TWOLEVEL MIXTURE (which is not yet available). TYPE=COMPLEX MIXTURE adjusts the standard errors and fit statistics for clustering. It does not allow modeling of between and within parts of the model. So if you include CLUSTER in your VARIABLE command and get rid of the %BETWEEN% and %WITHIN% parts of your MODEL command, you should be fine.
 Anonymous posted on Wednesday, November 19, 2003 - 8:16 pm
I am trying to look at several things and wondering if I could incorporate all in one model or I need several models to address each question. In our study students from several schools (14) were randomly assigned to two groups (control and intervention). Measures were obtained at baseline, post 1 week, post 3 months , and post 6 months. Three different outcomes (X,Y,Z) were assessed at each time point (1-4).

Q1: X1-->Y1-->Z1 (baseline)
The fit of this model and how well this model fits at subsequent time points (CFA with repeated measures)

Q2: How intervention and baseline factors affect the pre and post measures (X,Y,Z)(Growth modeling)

Q3: How we can examine the effect of different schools on the outcome measures and the above models (Multilevel analysis)

If it is possible to do these in one model, I would greatly appreciate your help in obtaining the correct syntax. If not, could you please let me have the syntax for Q1.
Thanks a million.
 Linda K. Muthen posted on Thursday, November 20, 2003 - 9:18 am
You could run one model that contains all components of your model. I would, however, not start there. I would always build a model up. With only 14 schools, multilevel modeling may not work well. We recommend 30-50 cluster units and never less than 20. If Q1 refers to a multiple indicator factor model with repeated measures over time, that is, if x1, y1, and z1 are latent variables, see Example 22.4 in the Mplus User's Guide and ignore the growth part of the model.
 Anonymous posted on Thursday, November 20, 2003 - 11:43 am
Thanks so much for your response. I would like a follow-up on the first part of the previous question. I did look at the example 22.4 and ran a model as follows (all variables below are latent):

Model 1 (at baseline)
z1 on x1 y1
y1 on x1

Model 2 (at time 2)
z2 on x2 y2
y2 on x2

Model 3 (at time 3)
z3 on x3 y3
y3on x3

This would give us parameter estimates and t-statics for each path. However, I would like to test the equality of the model parameters / fit at each time point. How do I test each model to determine wether the relationships among x, y, and z are statistically the same or different at each time point.
I have run all the basic models (ie. the above models and growth models on each outcome separately). Now, how do I incorporate these two into one model?
Thank you so much again.
 Linda K. Muthen posted on Thursday, November 20, 2003 - 5:12 pm
You just put them together in one MODEL command, for example,

z1 on x1 y1
y1 on x1

z2 on x2 y2
y2 on x2

z3 on x3 y3
y3on x3

and then set equalities and do a series of chi-square difference tests. Following is how you would set equalities for y on x.

z1 on x1 y1
y1 on x1 (1)

z2 on x2 y2
y2 on x2 (1)

z3 on x3 y3
y3on x3 (1)
 Nancy Beauregard posted on Tuesday, November 13, 2012 - 12:02 pm
Dear Dr Muthen,
I have a cross-sectional dataset where workers (N=2000) are nested in organizations (N=60). I'd like to perform a LCA on individual-level health outcomes (y1-y5), adjusted for individual-level covariates(x1-x10). I do not wish to explain organizational variability in latent classes, but simply to adjust the estimates for organizational membership (non independance of observations, see below org variable). To account for the hierarchical nature of the data, I'd run the following syntax:

VARIABLE: NAMES ARE org y1-y5 x1-x10;
USEVARIABLES ARE y1-y5 x1-x10;
CLUSTER = org;
CLASSES = c(2);
C#1 ON x1-x10;

My question is thus the following. Is there a diagnostic test to assess whether the clustering effect is statistically significant ? The rationale here being that if the clustering effect is not significant, a simple one-level LCA would yield the same results.

Many thanks, very much appreciated !

Nancy Beauregard
Assistant professor
School of Industrial Relations, University of Montreal
 Linda K. Muthen posted on Tuesday, November 13, 2012 - 1:21 pm
You can run this with and without taking clustering into account and see if there is a difference in the standard errors.
 Tracy Waasdorp posted on Thursday, March 21, 2013 - 12:05 pm
I am running a multilevel GMM. I found that in a 1-level GMM a 3 class model was best. I would now like to examine how school level factors are associated with the classes (but not changing or informing the makeup of those classes). I am trying to use the starting values from the 1-level GMM in the multilevel GMM, however I keep running into errors. I have also tried using starts=0 and optseed from the 1-level GMM in the multilevel GMM but this also resulted in errors. I am pasting a portion of my input. Thank you in advance for your assistance.

i s | t111db@0 t211db@.5 t311db@1.5 t411db@2.5 t511db@3.5;



ib sb | t111db@0 t211db@.5 t311db@1.5 t411db@2.5 t511db@3.5;


ib sb on T0M_smob T0M_Tenr T0FacTo t005strati;

c#1 c#2 on T0M_smob T0M_Tenr T0FacTo t005strati;
 Linda K. Muthen posted on Thursday, March 21, 2013 - 1:35 pm
Please send your output and license number to
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