

Modeling with TimeVarying Covariates 

Message/Author 


This exercise considers growth in mathematics achievement over grades 7, 8, 9, and 10 in U.S. public schools for a sample of 3,102 students. The data are from the Longitudinal Study of American Youth (LSAY). The data structure is multilevel with students clustered within schools, but for the purpose of this assignment this complication can be ignored. The research question is how the timevarying covariate of math course taking influences the math achievement growth. The variables in the attached LSAY data set are shown in the attached Mplus input for a BASIC analysis. Here, the math course taking variable is labeled mthcrs7mthcrs10 and is recorded as follows: mthcrs7mthcrs12 = Highest math course taken during each grade ! (0 = no course, 1 = low, basic, 2 = average, 3 = high, ! 4 = prealgebra, 5 = algebra I, 6 = geometry, ! 7 = algebra II, 8 = precalc, 9 = calculus) For simplicity, this variable may be treated as continuous. The exercise consists of using Mplus to find a good timevarying covariate growth model by exploring conventional approaches with fixed and random coefficients, as well as innovative alternatives. Individuals with little Mplus growth modeling experience may consult chapter 6 of the Mplus Version 5 User’s Guide (see www.statmodel.com). Although it is not possible for the Mplus team to look at individual solutions, the Mplus course at Johns Hopkins University on Thursday August 21, 2008 will present several solutions for this exercise. Bengt Muthen 

Scott Smith posted on Friday, October 18, 2013  1:13 pm



Hello, I am trying to model a growth curve model with a count dependent variable. I have four waves of data but I am using an accelerated cohort design. I already have my data wide. I want to use both timevarying and timeinvariant covariates. I used example 6.10 as a guide. If I only have the timeinvariant variable in the model (i.e. gender) the model will run. When I start to add the timevarying covariates (i.e. drug use at each time point) I get the following message: *** ERROR There is at least one count variable that has only one unique value. Please check your data and format statement. *** ERROR One or more variables in the data set have no nonmissing values. Check your data and format statement. This is my syntax model: i s dv16@0 dv17@1 dv18@2 dv19@3 dv20@4 dv21@5 dv22@6 dv23@7; i s ON female; dv16 ON drugs16 ; dv17 ON drugs17 ; dv18 ON drugs18 ; dv19 ON drugs19 ; dv20 ON drugs20 ; dv21 ON drugs21 ; dv22 ON drugs22 ; dv23 ON drugs23 ; Thank you for any advice can give me. 


Perhaps you have a lot of missing data on drugs16drugs23. If this is the cause of your problem and the missingness causes missing also on the corresponding dv's, we can give you a solution. 

Scott Smith posted on Saturday, October 19, 2013  9:08 am



I believe you are right because I am using an accelerated cohort design. What would you suggest I do to help with the missing data? I really appreciate any advice. 


Don't use a missing data flag for the timevarying covariates; use some other number. If the tvs is missing at time t and the outcome at the corresponding time is missing, such timepoints still won't contribute to the likelihood computations. By not using a missing data flag, you avoid deleting subjects who have missing on any tvcs. 

Scott Smith posted on Saturday, October 19, 2013  5:12 pm



That makes sense. I will give it a try. Thank you for your timely feedback. 


I have the same question, and Then what should I do with the missing values on TVCs? Should I just leave them as blanks in .dat file while missing values on other variables are represented as missing data flag? 


Just use some other value like 888 instead of 999. 


Dear professors: I think I know well how latent growth modeling with TVC works, but I'm not sure how to interpret its meaning properly in research papers. As the first post of this thread said, the research question is "how the timevarying covariate of math course taking influences the math achievement growth". Suppose that at each time point, course taking affect math achievement positively, how should I answer the research question? I don't think just say "timevarying course taking influence growth of math achievement positively" is enough. Can you propose an interpretation more in detail that can reflect some of the rationale of this model? And, can I understand TVC model as an extension of LGM by adding TVCs as predictors of growth besides calendar time (i.e., growth is joint function of both time and tvc)? Or,the term "growth" has to be a function of time exclusively, and TVC is just a correlate of growth? Thx! 


This general question is more suited for SEMNET. 

Back to top 

