@Narayanan,
Unfortunately we don't have an example in the doc but it should come soon! We'll need to start by adding a sample data table that's appropriate for a LGC.
For now, here are a few guidelines for Latent Growth Curves:
(1) The repeated measures data should be in "wide" format
(2) The most common LGCs are:
(2.a) "no-growth" model, which is an Intercept-only model. That is, a flat line is fit but we allow for variability in the intercept such that an estimate of each individual's "flat" line can be obtained.
(2.b) "Linear Growth" model, which has an Intercept and Slope factor, each with variances estimated to enable figuring out how much each individual departs from the average line ("departs" in terms of intercept and slope) --so we can estimte lines of best fit for every individual in the data.
(2.c) "Quadratic Growth" model, similar to the linear but we add a Quadratic slope as well. Now the trajectory can take a non-linear form.
(3) Each of the LGCs describe in #2 can be specified automatically by using the "Model Shortcuts" drop-down menu.
(4) When fitting all 3 alternatives, the "Model Comparison" table can be used to determine the best fitting model.
(5) It's also a good idea to use a parallel (or spaghetti) plot to visualize the trajectories.
(6) Variances of Intercept, linear slope, and quadratic slope can be fixed to zero if deemed necessary.
JSL Script
I'm attaching a script that should help as an example.
- The first part simulates data for 100 individuals who have been repeatedly measured on four occasions in equal-sized intervals.
- I then convert the data into wide format to be appropriate for SEM
- To visualize trajectories, I use a parallel plot
- I then launch the SEM platform
If you're incline to run the script, please:
(1) click on Model Shortcuts, select the first option, and click Run.
(2) click again in Model Shortcuts to select the second option and click Run.
(3) Finally, select the third option and click Run.
The data-generating model was a Linear Growth Curve, which is the reason why that model fits well and doesn't produce any warnings (such as negative variances). Negative variances in LGCs are sometimes symptoms of overfitting.
I hope this helps! Longitudinal data analysis is such fun! =)
~Laura
P.S. @G_M So glad you've been using the platform and find these models to run well!
Laura C-S