Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running latent growth curve model in Stata

    Hello everyone,

    I am trying to run latent growth curve models in Stata with the sem command. And I have two questioins that I am hoping to get help with.

    Below is my code for an unconditional linear LCM:

    sem (Int@1 Lin@0 -> health1) ///
    (Int@1 Lin@1 -> health2) ///
    (Int@1 Lin@2 -> health3) ///
    (Int@1 Lin@3 -> health4), ///
    noconstant mean(Int Lin) method(mlmv)

    My first question is about adding categorical predictors and covariates in the model. As far as I know, sem does not work with factor coding. Does that mean I have to dummy out all the categorical variables and list them in the model? How about for a time-varying covariate that has three categories? Do I need to dummy out the variable at each wave and put in all the 12 (3*4) binary variables? I wonder if there is a easier way to include categorical vars. Please let me know!

    My second question is about the TIME indicator. My sample involves four waves of data. At the first wave, respondents' age is between 20 to 30. I am wondering whether I can use AGE rather than survey WAVE as my time indicator, and how does that lead to a difference in my code?? I am used to using mixed command for growth analysis where there is a time variable in the code. But for the sem commend, how do we let Stata know which time indicator we want to use?

    Thanks for any help!!







  • #2
    With sem, you will have to create and add to the model all of the 0/1 indicators for all but one of the categories of your categorical variables. This will be true whether the variables are time-constant or time-varying.

    Regarding the time indicator, SEM is not set up for continuous time models. There are some exceptions to this, but you would need to use alternative software. You can try to code up age using a "time window" approach, but it amounts to creating more categories. See this illustration.

    The multilevel/mixed-effects approach to longitudinal data analysis is far superior for it's flexibility in handling time. Looking at your code, I wonder if you are using sem because you have missing data. If so, you can impute the missing data and then analyze it using mixed. Unless you can make the time window approach work (or are willing to use alternative software), this may be your best option.
    Last edited by Erik Ruzek; 04 Jul 2024, 14:25. Reason: Grammatical edits

    Comment

    Working...
    X