GMM and Plotting Both Sample and Esti... PreviousNext
Mplus Discussion > Growth Modeling of Longitudinal Data >
Message/Author
 Nicole R. Nugent posted on Thursday, July 05, 2007 - 10:47 am
I have conducted GMM and would like to essentially create a "SERIES = t1pts (s) t2pts (s) t3pts (s) t4pts (s); TYPE = PLOT3;" by hand in excel/ppt. Using Tech7 I am able to get sample means for each class at each timepoint for the figure but I haven't been able to sort out how to obtain the estimated means. Also, in a perfect world, I'd like to create error bars around each mean. Is there a command to give me these numbers that I have missed? I sincerely appreciate your help!

Warm Regards, Nicole Nugent
 Linda K. Muthen posted on Thursday, July 05, 2007 - 12:08 pm
The values that are plotted are taken from the RESIDUAL option of the OUTPUT command. Alternatively, you can Save Graph Data while you are viewing plots in Mplus. I can't think of any way to get confidence intervals around the growth curve without computing them by hand.
 Amber McEachern posted on Friday, June 26, 2009 - 1:07 pm
Drs. Muthén,
I am running a GMM on a randomized preventive intervention sample and am using the Muthén, Brown, Masyn, et. al. (2002) article as a guide (very helpful, especially with the additional examples posted on this website-thank you). In Figure 2 of this article you display graphs showing the simultaneous trajectories of the intervention and control groups; however, I do not understand how these graphs were obtained. Is/are additional syntax command(s) needed to produce these graphs, or must another program be used?
 Bengt O. Muthen posted on Friday, June 26, 2009 - 1:29 pm
Figure 2 can be produced with the Mplus PLOT command. Use the Adjusted means menu option to choose the 2 x values for the tx dummy variable covariate to plot 2 curves for each mixture class in one and the same figure.
 Kelvin Choi posted on Friday, December 03, 2010 - 7:10 am
Hi,
I am running a GMM with a dichotomous variable, and I want to plot the trajectories of the classes I estimated. I used plot function and specified the series as

Series = MD12_5(0) MD13(0.5) MD13_5(1) MD14(1.5) MD14_5(2) MD15(2.5) MD15_5(3);

Should I look at the estimated probability for the trajectories? I thought I would be looking at estimated means... Please let me know what graph I should look at.
 Linda K. Muthen posted on Friday, December 03, 2010 - 8:07 am
You should look at estimated probabilities. Continuous variables have means. Categorical variables have probabilities.
 mari posted on Thursday, April 28, 2011 - 12:23 pm
Hello, I am running GMM of smoking with 4 time points. The smoking variable is ordinal with 7 categories. I found that some articles present "estimated mean trajectories" even though the outcome variable is ordinal (e.g., Feldman, Masyn, and Conger, 2009).

I want to draw the trajectories by hand. The following is the excerpt of my output.

Means
I -2.780 0.122 -22.716 0.000
S 0.497 0.027 18.406 0.000

Thresholds
SMOKE1$1 0.209 0.120 1.739 0.082
SMOKE1$2 1.032 0.126 8.212 0.000
SMOKE1$3 1.405 0.128 10.989 0.000
SMOKE1$4 2.388 0.134 17.791 0.000
SMOKE1$5 3.077 0.144 21.360 0.000
SMOKE1$6 3.694 0.153 24.145 0.000

In my model, timepoints are 0,1,2,and 3. I am wondering if the predicted (or estimated) y* can be computed like this:

Y* = -2.78 + 0.497 * 0
Y* = -2.78 + 0.497 * 1
Y* = -2.78 + 0.497 * 2
Y* = -2.78 + 0.497 * 3

Otherwise, should the values of thresholds be used for this computation? if so, how can I plug the threshold values in this equation?

I am sorry for this beginner's question. I will really appreciate your kind anwer.
 Linda K. Muthen posted on Friday, April 29, 2011 - 9:13 am
You can use the PLOT command to get these plots. The gph file will contain the probabilities.

Your y* values are correct but they need to be converted to probabilities using formulas 16-32 in Technical Appendix 1 on the website.
 mari posted on Friday, April 29, 2011 - 10:31 am
Thank you so much for your reply. I cannot use the PLOT command because I use "type=imputation" for multiply imputed 20 data sets.

Also, I want to present two graphs, one for estimated mean trajectories (line plot) and the other for estimated probabilities conditioned on class (stacked column graph in excel).

In the article (Feldman, Masyn, and Conger, 2009), the estimated Y* plot is not a probability scale because Y-axis ranges from -6 to 6. Also, in the other article (Muthén, Brown, Masyn, et. al. (2002), figure 1 is estimated mean trajectories with 1 to 6 on Y-axis. Both articles are using ordinal outcome variables. I wonder how those figures are made because my variables are also ordinal with 7 categories.

I know that categorical variables need to use probabilities, but if y-axis is "estimated mean y*" (not estimated probability), isn't it correct to use the values that I calculated above?

I appreciate your help again.
 Bengt O. Muthen posted on Friday, April 29, 2011 - 5:49 pm
You can plot the estimated y* means and get a feeling for how the latent response variable y* changes over time. Just remember that they are not probabilities.

The Muthen et al. article treats the outcomes Y as continuous. If you don't have a lot of skewness or floor/ceiling effects you can also treat your outcome as continuous.
 mari posted on Sunday, May 08, 2011 - 6:52 pm
Thank you again for your kind response!!
I have another question. After adding covariates to unconditional 3-class model, the class membership changed from 3/13/83 to 6/16/77.

Q1. Can I still justify the number of class based on unconditional models even though the class membership has changed?

Q2. I am wondering how to use the outputs of conditional models for drawing graphs of estimated Y* mean?

For comparing treatment vs. control groups, for example, would the following calculation be correct?

S ON Treatment
1.226
Means I
0.162
Intercepts S
-0.154

For the treatment group,
Y* = 0.162 + (-0.154+1.226*1)*0
Y* = 0.162 + (-0.154+1.226*1)*1
Y* = 0.162 + (-0.154+1.226*1)*2
Y* = 0.162 + (-0.154+1.226*1)*3

For the control group,
Y* = 0.162 + (-0.154+1.226*0)*0
Y* = 0.162 + (-0.154+1.226*0)*1
Y* = 0.162 + (-0.154+1.226*0)*2
Y* = 0.162 + (-0.154+1.226*0)*3

Thank you so much for your help!!
 Bengt O. Muthen posted on Sunday, May 08, 2011 - 8:14 pm
Q1. If the class % hasn't changed more than that and if the interpretation of the classes remains the same (their curves look the same), I wouldn't worry - so, yes.

Q2. You need to use the TECH4 values for growth factors that are dependent variables such as S - you can't just use the intercept of S.
 mari posted on Monday, May 09, 2011 - 8:18 am
Thank you again for your help!!
TECH4 printed values as follows:

Estimated means for the latent variables
I 0.162
S 0.081
Treatment 1.344

Then, should I plug in the slope mean (0.081) instead of the intercept of S (-0.154) in the formula above?

For example,would the estimated Y* of the treatment group at time 0 be like this?

Y* = 0.162 + (0.081+1.226*1)*0

Sorry for this beginner's question again.
 Bengt O. Muthen posted on Monday, May 09, 2011 - 8:42 am
Yes.
 mari posted on Monday, May 09, 2011 - 1:12 pm
Thank you for your quick answer!
Now I want to compute the estimated probabilities conditioned on class by hand. For unconditional models, I got the probabilities from the "residual" command. But after adding covariates, the results are no longer available. I have no idea how these are computed.

When the outputs are as follows, would you please show me how to compute the estimated probablies of the treatment group? I want probabilities of 7 categories.

S ON Treatment
1.226
Means I
0.162
Intercepts S
-0.154

Estimated means for the latent variables
I 0.162
S 0.081
Treatment 1.344

Thresholds
SMOKE1$1 0.209 0.120 1.739 0.082
SMOKE1$2 1.032 0.126 8.212 0.000
SMOKE1$3 1.405 0.128 10.989 0.000
SMOKE1$4 2.388 0.134 17.791 0.000
SMOKE1$5 3.077 0.144 21.360 0.000
SMOKE1$6 3.694 0.153 24.145 0.000

Thank you so much for your help!
 Bengt O. Muthen posted on Monday, May 09, 2011 - 6:26 pm
Adding covariates, you do the same as when you have Treatment - work with Tech4.

Note, that we are talking about getting the y* means for plotting. If you want the probabilities, things get more difficult because you have to do numerical integration over the growth factor distribution. That is not something one does by hand.
 mari posted on Tuesday, May 10, 2011 - 8:44 am
I see.. I thought the probabilities could be computed by hand. Thank you for your all kind answers!
 EFried posted on Wednesday, February 22, 2012 - 2:38 am
To pick up on one of Mari's questions:

Adding two time invariant covariates to my GMM (5 measurement points and a continuous outcome variable), the fit improves and the model still converges just fine.

However, the class membership percentages change and the curves look drastically different.

BLRT and LMR-LRT still prefer this class solution over the k-1 class-solution.

How should one interpret this? Is there literature on this?

Thank you
 Linda K. Muthen posted on Wednesday, February 22, 2012 - 1:24 pm
This suggests a need for direct effects between the outcome and the covariates. See the following paper on the website:

Muthén, B. (2004). Latent variable analysis: Growth mixture modeling and related techniques for longitudinal data. In D. Kaplan (ed.), Handbook of quantitative methodology for the social sciences (pp. 345-368).
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: