LGCM Reference

Quick lookup for LGCM syntax, fit indices, parameters, and troubleshooting.

LGCMquick-referencesyntax

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

ScenarioEstimatorCode
Complete dataML (default)growth(model, data)
Missing data (MAR)FIMLmissing = "fiml"
Non-normal dataMLRestimator = "MLR"
Ordinal outcomesWLSMVestimator = "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

IndexGoodAcceptableInterpretation
χ² p-value> .05> .01Non-significant = adequate fit
CFI≥ .95≥ .90Comparative fit (vs. null model)
RMSEA≤ .06≤ .08Population misfit estimate
SRMR≤ .08≤ .10Avg. residual correlation

Parameters

ParameterSymbolInterpretation
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

CenteringLoadingsIntercept =
Wave 1 (default)0, 1, 2, 3, 4Score at Wave 1
Midpoint-2, -1, 0, 1, 2Score at Wave 3
Final wave-4, -3, -2, -1, 0Score at Wave 5
Actual months0, 3, 6, 12, 24Score at baseline

Slope interpretation unchanged by centering; intercept moves to the zero-point.


Common Errors & Fixes

IssueSymptomFix
Negative varianceslope variance = -2.4Constrain to 0 or simplify model
Non-convergence"Model did not converge"Check N, outliers; provide start values
Huge SEsSE > estimateParameter poorly identified; simplify
Poor fitCFI < .90, RMSEA > .10Check linearity; consider quadratic
Variable name mismatchlavaan error about variablesUse 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

Pitfall
These mistakes are common but avoidable:

MistakeReality
"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 studiesIntercept 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
'
CoefficientInterpretation
intercept ~ treatmentGroup difference in starting level
slope ~ treatmentGroup 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

ExtensionDescriptionNotes
Growth Mixture ModelsLatent subgroups with different trajectoriesComplex; requires specialized packages
Parallel ProcessTwo outcomes growing togetherRelate intercepts/slopes across processes
Latent Change ScoreChange between adjacent wavesTests 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

ArticleFocus
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


Software

PackageUse Case
lavaanPrimary choice; free, flexible, active development
OpenMxMaximum flexibility; steeper learning curve
lme4 / nlmeMLM approach; equivalent for basic models
semToolslavaan extensions (measurement invariance)
lcmmLatent class / mixture growth models
MplusGold standard for complex/mixture models; licensed
Stata (sem)Good documentation; integrates with Stata workflow

TutorialFocus
LGCM BasicLinear growth with lavaan
LGCM Basic (OpenMx)Linear growth with OpenMx
LGCM Multiple GroupsGroup comparisons
LGCM Time-Invariant CovariatesPredictors of growth
LGCM Time-Invariant Covariates (OpenMx)Predictors of growth with OpenMx
LGCM NestingNested/clustered data
MLGCMMultivariate growth
MLGCM (OpenMx)Multivariate growth with OpenMx