Announcement

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

  • Plotting fitted growth curve using SEM

    Hello all,

    I am using the sem command to estimate a Latent Growth Curve, and I would like to plot the fitted growth curve, but can't seem to figure out how.

    Taking a simple data set from UCLA's Stata tutorial as an example:

    Code:
     
     use https://stats.idre.ucla.edu/stat/data/depression_clean, clear
    Code:
    sem (dep0 dep1 dep2 <-F1@1) (dep0@0 dep1@1 dep2@2 <-F2), var(e.dep0@var e.dep1@var e.dep2@var)
    Above, F1 is the intercept, and F2 is the slope. dep0 dep1 and dep3 are the 3 timepoints.
    Code:
    predict factor*, latent
    Pulling out F1 and F2 into variables Factor1 and Factor2 that will now appear as columns in the data table, where Factor1 is intercept, Factor2 is slope. So in the data table, each participant (the sid column) now has a value for intercept (Factor1) and slope (Factor2)

    I am doing this because I imagine you need to pull out the scores in order to use them as input for a plot.

    Now, I'd like to plot the fitted growth curves for the dataset, where the x-axis ticks would be labeled dep0, dep1, and dep2, but I can't seem to figure out how. Any help would be appreciated!





Working...
X