LGCM Quick Reference
Fast lookup for syntax, fit indices, and troubleshooting. For step-by-step learning, see the Walkthrough. For conceptual background, see the Overview.
Jump to: Syntax · Estimation · Extract Output · Model Comparison · Fit Indices · Errors & Fixes · Extensions · Resources
lavaan Syntax
Basic Linear Growth
model <- '
intercept =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
slope =~ 0*y1 + 1*y2 + 2*y3 + 3*y4 + 4*y5
'
fit <- growth(model, data = data_wide)
summary(fit, fit.measures = TRUE, standardized = TRUE)
Equal Residual Variances
y1 ~~ rv*y1
y2 ~~ rv*y2
y3 ~~ rv*y3
y4 ~~ rv*y4
y5 ~~ rv*y5
Fixed Slope (No Variance)
slope ~~ 0*slope
intercept ~~ 0*slope
Predictor of Growth
intercept ~ predictor
slope ~ predictor
Quadratic Growth
intercept =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
slope =~ 0*y1 + 1*y2 + 2*y3 + 3*y4 + 4*y5
quad =~ 0*y1 + 1*y2 + 4*y3 + 9*y4 + 16*y5
Piecewise Growth
intercept =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
slope1 =~ 0*y1 + 1*y2 + 2*y3 + 2*y4 + 2*y5
slope2 =~ 0*y1 + 0*y2 + 0*y3 + 1*y4 + 2*y5
Latent Basis (Freed Loadings)
intercept =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
slope =~ 0*y1 + y2 + y3 + y4 + 1*y5
Correlated Adjacent Residuals
y1 ~~ y2
y2 ~~ y3
y3 ~~ y4
y4 ~~ y5
Multigroup Growth
fit <- growth(model, data = data_wide, group = "group_var")
Estimation & Missing Data
| Scenario | Estimator | Code |
|---|---|---|
| Complete data | ML (default) | growth(model, data) |
| Missing data (MAR) | FIML | missing = "fiml" |
| Non-normal data | MLR | estimator = "MLR" |
| Ordinal outcomes | WLSMV | estimator = "WLSMV" |
FIML for missing data:
fit <- growth(model, data = data_wide, missing = "fiml")
Robust SEs (non-normality):
fit <- growth(model, data = data_wide, estimator = "MLR")
Ordinal outcomes:
fit <- growth(model, data = data_wide, estimator = "WLSMV")
Extract Output
Fit Indices
fitmeasures(fit, c("chisq", "df", "pvalue", "cfi", "rmsea", "srmr"))
Growth Factor Means
parameterEstimates(fit) %>%
filter(op == "~1", lhs %in% c("intercept", "slope"))
Growth Factor Variances/Covariances
parameterEstimates(fit) %>%
filter(op == "~~", lhs %in% c("intercept", "slope"),
rhs %in% c("intercept", "slope"))
Standardized Estimates
parameterEstimates(fit, standardized = TRUE) %>%
select(lhs, op, rhs, est, se, std.all)
R² (Variance Explained)
inspect(fit, "r2")
Residual Correlations
resid(fit, type = "cor")$cov %>% round(3)
Modification Indices
modindices(fit, sort = TRUE, minimum.value = 10)
Model Comparison
Nested Models (LRT)
anova(fit_constrained, fit_full)
Robust LRT (for MLR fits)
anova(fit1, fit2, method = "satorra.bentler.2001")
Information Criteria
AIC(fit1); AIC(fit2) # Lower = better
BIC(fit1); BIC(fit2) # Lower = better
Fit Indices
| Index | Good | Acceptable | Interpretation |
|---|---|---|---|
| χ² p-value | > .05 | > .01 | Non-significant = adequate fit |
| CFI | ≥ .95 | ≥ .90 | Comparative fit (vs. null model) |
| RMSEA | ≤ .06 | ≤ .08 | Population misfit estimate |
| SRMR | ≤ .08 | ≤ .10 | Avg. residual correlation |
Parameters
| Parameter | Symbol | Interpretation |
|---|---|---|
| Intercept mean | μᵢ | Average score at Time = 0 |
| Slope mean | μₛ | Average change per time unit |
| Intercept variance | ψᵢᵢ | Individual differences in starting level |
| Slope variance | ψₛₛ | Individual differences in change rate |
| I-S covariance | ψᵢₛ | Start-change relationship |
| Residual variance | θ | Unexplained variance at each wave |
Time Coding
| Centering | Loadings | Intercept = |
|---|---|---|
| Wave 1 (default) | 0, 1, 2, 3, 4 | Score at Wave 1 |
| Midpoint | -2, -1, 0, 1, 2 | Score at Wave 3 |
| Final wave | -4, -3, -2, -1, 0 | Score at Wave 5 |
| Actual months | 0, 3, 6, 12, 24 | Score at baseline |
Slope interpretation unchanged by centering; intercept moves to the zero-point.
Common Errors & Fixes
| Issue | Symptom | Fix |
|---|---|---|
| Negative variance | slope variance = -2.4 | Constrain to 0 or simplify model |
| Non-convergence | "Model did not converge" | Check N, outliers; provide start values |
| Huge SEs | SE > estimate | Parameter poorly identified; simplify |
| Poor fit | CFI < .90, RMSEA > .10 | Check linearity; consider quadratic |
| Variable name mismatch | lavaan error about variables | Use names(data) to verify spelling |
Troubleshooting
Non-Positive Definite Matrix
- Very high correlations between time points
- Variance estimates near zero
- Try constraining residual variances equal
Negative Variance (Heywood Case)
slope ~~ 0*slope # Constrain to zero
intercept ~~ 0*slope # Also fix covariance
Non-Convergence
- Increase iterations:
control = list(iter.max = 10000) - Check sample size relative to model complexity
- Simplify model (fewer free parameters)
Flag Problematic Estimates
parameterEstimates(fit) %>%
filter(op == "~~", est < 0)
Interpretation Pitfalls
| Mistake | Reality |
|---|---|
| "Everyone improved" (slope mean = 2) | Check slope variance—many may have slope ≤ 0 |
| "High starters declined" (negative I-S corr) | Negative correlation = slower growth, not decline |
| "Good fit = correct model" | Good fit ≠ true model; consider alternatives |
| Comparing intercepts across studies | Intercept meaning depends on time coding |
For detailed examples and fixes, see LGCM Overview.
Quick Formulas
Intercept-slope correlation:
r_is <- cov_is / sqrt(var_i * var_s)
Proportion with positive slopes:
pnorm(0, mean = slope_mean, sd = sqrt(slope_var), lower.tail = FALSE)
Degrees of freedom:
fitmeasures(fit, "df")
Advanced Extensions
Time-Invariant Predictors (TIC)
Baseline characteristics predicting growth:
model <- '
intercept =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
slope =~ 0*y1 + 1*y2 + 2*y3 + 3*y4 + 4*y5
intercept ~ treatment + age
slope ~ treatment + age
'
| Coefficient | Interpretation |
|---|---|
intercept ~ treatment | Group difference in starting level |
slope ~ treatment | Group difference in rate of change |
Time-Varying Covariates (TVC)
Concurrent predictors at each wave:
model <- '
intercept =~ 1*y1 + 1*y2 + 1*y3 + 1*y4 + 1*y5
slope =~ 0*y1 + 1*y2 + 2*y3 + 3*y4 + 4*y5
y1 ~ x1
y2 ~ x2
y3 ~ x3
y4 ~ x4
y5 ~ x5
'
Other Extensions
| Extension | Description | Notes |
|---|---|---|
| Growth Mixture Models | Latent subgroups with different trajectories | Complex; requires specialized packages |
| Parallel Process | Two outcomes growing together | Relate intercepts/slopes across processes |
| Latent Change Score | Change between adjacent waves | Tests dynamic coupling |
Path Diagram
┌─────────────┐ ┌─────────────┐
│ Intercept │ │ Slope │
│ (I) │◄────────►│ (S) │
└──────┬──────┘ └──────┬──────┘
│ │
┌───────┬───────┼───────┬───────┐ │
│1 │1 │1 │1 │1 │
▼ ▼ ▼ ▼ ▼ │
┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │
│y1 │ │y2 │ │y3 │ │y4 │ │y5 │ │
└─┬─┘ └─┬─┘ └─┬─┘ └─┬─┘ └─┬─┘ │
▲ ▲ ▲ ▲ ▲ │
│0 │1 │2 │3 │4 │
└───────┴───────┴───────┴───────┴───────┘
Intercept loadings: all = 1
Slope loadings: 0, 1, 2, 3, 4 (encode time)
Resources
Open-access resources for learning and applying LGCM.
Articles
| Article | Focus |
|---|---|
| Duncan & Duncan (2004). The ABC's of LGM: An Introductory Guide to Latent Variable Growth Curve Modeling. | Conceptual introduction to LGCM — intercept/slope factors, path diagrams, growth parameters |
| Biesanz, Deeb-Sossa, Papadakis, Bollen, & Curran (2004). The Role of Coding Time in Estimating and Interpreting Growth Curve Models. | How time coding choices affect intercept meaning and growth factor (co)variances |
Online
- lavaan tutorial: Growth models
- QuantDev tutorials
- CenterStat (YouTube — Curran & Bauer lectures on longitudinal methods)
Software
| Package | Use Case |
|---|---|
| lavaan | Primary choice; free, flexible, active development |
| OpenMx | Maximum flexibility; steeper learning curve |
| lme4 / nlme | MLM approach; equivalent for basic models |
| semTools | lavaan extensions (measurement invariance) |
| lcmm | Latent class / mixture growth models |
| Mplus | Gold standard for complex/mixture models; licensed |
| Stata (sem) | Good documentation; integrates with Stata workflow |
Related Tutorials
| Tutorial | Focus |
|---|---|
| LGCM Basic | Linear growth with lavaan |
| LGCM Basic (OpenMx) | Linear growth with OpenMx |
| LGCM Multiple Groups | Group comparisons |
| LGCM Time-Invariant Covariates | Predictors of growth |
| LGCM Time-Invariant Covariates (OpenMx) | Predictors of growth with OpenMx |
| LGCM Nesting | Nested/clustered data |
| MLGCM | Multivariate growth |
| MLGCM (OpenMx) | Multivariate growth with OpenMx |
Related Guides
- LGCM Overview — When to use, key concepts, mathematical notation
- LGCM Walkthrough — Step-by-step worked example
- LMM Overview — Linear mixed models for continuous outcomes
- GLMM Overview — Generalized mixed models for non-continuous outcomes
- GEE Overview — Population-averaged alternative to mixed models