Message/Author 

Anonymous posted on Thursday, May 20, 2004  2:23 pm



In many published papers that have employed proc traj to define latent trajectory classes, the authors have assigned subjects to their "most likely class" via the posterior probs. and then assessed differences in both nontime varying and timevarying covariates as a function of class membership. Of course, the mplus approach of including the covariates in the gmm model seems much more desirable. While I understand how to incorporate nontime varying covariates (both predictors of class membership and distal outcomes of class membership) in a gmm, I'm unclear on how best to incorporate timevarying covariates. Ultimately, I'd like to present the probability of several different timevarying covariates at each age for each of my latent trajectory classes. Do you have any advice for me? 

bmuthen posted on Friday, May 21, 2004  9:10 am



Timeinvariant covariates are typically modeled as predictors of the latent class variable and therefore you can easily see how class probabilities change as a function of those predictors, examining the estimated slopes. For all other variables, you get the estimated means in each class when you request Tech7 and/or Residual output. Typically, timevarying covariates would not be predictors of the latent class variable since the latent class variable is typically viewed as timeinvariant  unless you want to use latent transition modeling. 

Anonymous posted on Friday, May 21, 2004  12:26 pm



Thank you for your response. To add the timeinvariant predictors to the model would I just include them in the usevariables command and allow them to be considered y variables? And, does this violate any assumptions given that the time varying covariates are likely to be correlated with one another? 

bmuthen posted on Friday, May 21, 2004  12:50 pm



Yes, you simply include them in the usev command. Saying "yt on xt" in the Model command, they will be considered x variables and are therefore freely correlated. 

Anonymous posted on Tuesday, June 08, 2004  2:22 pm



Thank you for your advice on this. I've been exploring my data using this technique and I have a clarification question. I'm modeling the latent trajectory classes of committing an assault (binary) over 13 measurement occassions. I want to include several timevarying covariates that I believe are subtantively important, including gang membership and illicit drug use. My intent is to allow them to be part of the model in order to develop the best possible growth mixture model of assault and also to see how these TVC's change over time as a function of group membership. I'm confused about how these should be entered into my model. That is, if I just include them as Y variables should I allow them to be correlated with one another and with assault within measurement occassion? Do you have any advice for the best specification of my model? Thank you! 


You could include the repeated measures of gang membership and illicit drug use either as timevarying covariates or as parallel growth processes. 

Anonymous posted on Wednesday, June 09, 2004  8:32 am



As a TVC, should I allow them to be correlated within time within each classassault at age 20 with gang membership at age 20? And, is this possible with binary outcomes in mplus (both assault and gang membership are binary in my model)? Do you have an example on your website (or in your book) in which a TVC is added to a growth mixture model  I've looked but can't seem to find one. Thank you again for your help. 


The TVC's are correlated automatically. The model is estimated conditioned on the x variables and you can obtain the correlations among the TVC's by asking for SAMPSTAT in the OUTPUT command. You can generalize Example 6.12 which has timevarying covariates to the mixture case. 

Anonymous posted on Thursday, June 10, 2004  9:41 am



Thank you. By correlation within time, I meant that I wanted to be able to correlate assault at age 13 with gang membership at 13, and assault at age 14 with gang membership at 14, etc. Is it possible to do this with binary items in a GMM? 


I believe all of the variables you are referring to are exogenous. They are not part of the model estimation. The model is estimated conditioned on them. Because of this these correlations are not part of the results. If they were, they would be the values obtained from the sample statistics. I think you might be confused by the fact the the covariances of latent class indicators cannot be correlated using the WITH option. This must be done using a trick. 

Anonymous posted on Sunday, June 13, 2004  9:11 pm



I see, thank you for your patience with me. So, if I understand correctly, then by including TVC's in this way, the GMM model shouldn't change at all. Rather, the sampstat output simply gives me the correlations. This is exactly what I want because I don't want my GMM of assault to be changed by the inclusion of the TVC's...(like what would happen if I thought of the model as a dual trajectory model). I simply want to graphically plot how the means of my TVC's change over time differently across the latent trajectory classes estimated by the GMM. Is my understanding of this correct? And, one last question...it seems that anyone with a missing TVC is deleted (my sample size is cut in half when I include the TVC's in the USEV command). Is there a way that the missing TVC's could be estimated using FIML with the rest of the model? 


The GMM model may change by adding covariates. But the correlations among these covariates will be the values of the sample statistics. The following paper can be downloaded from the homepage of our website. It discusses model changes when covariates are added. 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. Newbury Park, CA: Sage Publications, in press. Regarding losing cases with missing on covariates, if you mention their variances in the model command, you will not lose them. The normality assumption will change from normality conditioned on the x's to normality. 

Anonymous posted on Monday, June 14, 2004  6:41 pm



Thank you for the reference, the paper was extremely helpful. I can't seem to find the examples that you refer to in the footnote on page 362. Have they been moved? 


The examples have not yet been posted. 

Anonymous posted on Tuesday, August 30, 2005  7:02 am



Hi. I am trying to estimate a lgmm that includes 12 timepoints over the course of a year but each timepoint of the outcome measure (y) does not represent the same month for each individual. I would like to add timevarying covariates (x) that were measured at baseline, 6, and 12months for all individuals. Essentially I want to regress class membership on the slope of the timevarying covariate. Using y6 on x6 does not work in this case because y6 is not month 6 for all individuals. Can Mplus estimate a model that includes the intercept and slope of the covariates as predictors of either class membership or the i and s of the outcome variable? Thanks! 

bmuthen posted on Tuesday, August 30, 2005  7:22 am



Mplus can predict class membership from latent variables such as growth factors. This requires numerical integration in the ML estimation (algorithm = integration). Indidividuallyvarying times of observation (different months of measurement) can be handled in Mplus. But if "y_t on x_t" changes as a function of t (time; i.e. month), the estimation would be problematic since each person (measurement time) would have its own slope in this regression. Perhaps you can group months together that have approximately the same slope. 


Hello, I'm fitting the latent mixture model for the homicide rate at the county level over 20 years. My first question concerns with counties with homicide rate of 0.000. Does Mplus inclide them in the analysis? On a graph these points are missing, and in the individual graph file these counties are assigned 999.000 numbers. I tried to use a rate of 0.001 instead of 0.000, but it did not help. Please advise me on what could be done in such instances? My second question refers to the time of execution. For example, a fourclass model takes more than 176 hours to execute. Is there any way to speed up the execution? 


Mplus does not exclude any data from the analysis. An analysis that takes so long may be set up incorrectly. Please send the files and your license number to support@statmodel.com. 


I am running a growth mixture model with a binary outcome and a time varying covariate. Is it possible to estimate a random slope for the time varying covariate when TYPE=MIXTURE? 


Yes, this is possible using TYPE=MIXTURE RANDOM. 

Hemant Kher posted on Friday, December 17, 2010  8:49 am



Hello Professor Muthen, I have a question about my model with a time varying covariate (TVC). I have modeled growth in Y measured at 4 points (y1y4). X is TVC measured at same time points (x1x4). The growth model (M1) for Y with TVC fits well. When I include gender, a timeinvariant covariate in the growth model with TVC (M2), the fit deteriorates. However, when I regress y1y4 on Gender directly while retaining x1x4 as TVC (M3) the fit for M3 improves significantly compared to M2. I have not seen such a model before (and it seems like I am modeling growth while controlling for TVC and gender). Do you have any thoughts on this (at your convenience). Thank you as always. 


Please send the outputs that illustrate the problem and your license number to support@statmodel.com. It would be impossible to say without further information. 

Laura posted on Tuesday, November 13, 2012  3:09 am



Hi! I am doing a latent class growth analysis with a count outcome similar to the example 8.11. in the User’s Guide. Is it possible to add a timevarying covariate to this model? Or is it only possible with GMM models? 


You can add timevarying covariates to that model. 

Joe posted on Wednesday, September 10, 2014  10:36 am



What is the equation for the estimated outcome mean at timepoint t with a dichotomous timevarying covariate? 


Just add + beta*Mean(x_t) to the formulas on slides 9798 of Topic 3. 

Joe posted on Wednesday, September 10, 2014  1:44 pm



Where Mean(x_t) is the observed mean of the categorical timevarying variable x at timet? In this case, at t1, the beta = 0.027 and the observed mean for x at t1 = .054. This difference is negligible at the intercept and I am having trouble with interpretation. 


Right. When you say negligible I assume you also take into account the variance of the DV you consider. A rare x event together with a small beta might not have much of an impact. 

Joe posted on Thursday, September 11, 2014  7:24 am



Please forgive my lack of understanding. What is the difference between my dichotomous indicator (special education) predicting the intercept versus time0? Assume no other predictors in the model. In these cases: i ON sped; beta = 2.616 (0.250) t0 ON sped; beta = 0.742 (0.154) The first most closely matches the observed means of the outcome at t0 


The effect on the intercept has an indirect effect on the outcome at all time points. You may want to study our video and handout for Topics 3 and 4 on our website. 


I am trying to run a survival analysis predicting onsets of major depression with a latent variable as a timeinvariant covariate (Neuroticism) together with an observed, timevarying covariate (major stressful life events) and I'd like to include the interaction of the two covariates. When I only have the timevarying predictor in the model, Mplus allows me to constrain the effects of that variable to be equal over all the waves of assessment which I find very desirable to get a single test of the effects of that variable with greater power than the test of its effect at each assessment wave. This also makes it comparable, in my view, to a conventional survival analysis which provides a single test of the effect of a timevarying covariate. Once I add the timeinvariant covariate, however, I get the following "Fatal Error" message: *** FATAL ERROR EQUALITIES BETWEEN PARAMETERS ARE NOT POSSIBLE IN THIS SITUATION. Can I get a single test in Mplus of the effect of the timevarying covariate (and its interaction wtih the timeinvariant covariate) with the timevarying covariate in the model? If so, how? Thanks in advance! 


Please send the output with the Fatal Error message to Support along with your license number. 

Back to top 