Tutorials › Biostatistics › Growth Curve Modeling in Clinical Research

Longitudinal Data & Mixed Models

Growth Curve Modeling in Clinical Research

A practical guide to modeling longitudinal trajectories in clinical research using growth curve models, including fixed effects, random intercepts and slopes, time-by-treatment interactions, covariance structures, nonlinear trajectories, interpretation, missing data, and implementation in R.

Advanced 18 min read

What You'll Learn

  • What a growth curve represents in a longitudinal clinical study
  • How fixed effects describe the population-average trajectory
  • Why random intercepts and random slopes are used
  • How treatment-by-time interactions test differences in trajectories
  • How covariance structures affect growth curve models
  • How to fit, interpret, diagnose, and report growth curve models in R

Introduction

Many clinical endpoints are measured repeatedly over time. A patient's blood pressure may be recorded at baseline, Week 4, Week 8, and Week 12. A biomarker may be measured monthly. A symptom score may be collected at every study visit.

The scientific question is often not simply: What is the treatment difference at Week 12?

Instead, investigators may want to understand the entire trajectory: How does the outcome change over time, and does the treatment alter the pattern of change?

This is the central motivation for growth curve modeling.

A growth curve model describes how an outcome evolves as a function of time while allowing individual patients to have different starting values and, when appropriate, different rates of change.

Key idea: A growth curve model treats longitudinal observations as measurements of an underlying trajectory. Fixed effects describe systematic features of the trajectory across the population, while random effects allow individual patients to deviate from that average trajectory.

What Is a Growth Curve?

Suppose \(Y_{ij}\) is the outcome measured for patient \(i\) at time \(t_{ij}\). A simple linear growth curve is: \[ Y_{ij}=\beta_0+\beta_1t_{ij}+\varepsilon_{ij} \]

Here:

  • \(\beta_0\) is the average outcome at time zero.
  • \(\beta_1\) is the average rate of change over time.
  • \(\varepsilon_{ij}\) is residual variation.

If \(\beta_1>0\), the average outcome increases over time. If \(\beta_1<0\), the average outcome decreases over time.

This is already a growth curve, but it assumes that every patient follows exactly the same trajectory apart from residual measurement error.

That assumption is usually unrealistic in clinical research.

Why Patients Need Individual Trajectories

Consider a symptom score measured repeatedly after treatment. One patient may start with a high symptom score and improve rapidly. Another may start with a lower score and improve slowly. A third may improve initially and then plateau.

A model that forces all patients to share one intercept and one slope cannot adequately represent this heterogeneity.

A growth curve mixed model addresses this by allowing patient-specific parameters.

\[ Y_{ij} = (\beta_0+b_{0i}) + (\beta_1+b_{1i})t_{ij} + \varepsilon_{ij} \]

The two patient-specific random effects are:

  • \(b_{0i}\): patient-specific deviation from the average intercept.
  • \(b_{1i}\): patient-specific deviation from the average slope.

Therefore, patient \(i\)'s trajectory is:

\[ Y_{ij} = \underbrace{\beta_0+\beta_1t_{ij}}_{\text{population trajectory}} + \underbrace{b_{0i}+b_{1i}t_{ij}}_{\text{individual deviation}} + \varepsilon_{ij} \]
Interpretation: The fixed effects define the average growth curve. The random intercept and random slope allow each patient to have a different starting point and a different rate of change.

Growth Curve Models Are Mixed-Effects Models

Growth curve modeling is closely related to the broader class of linear mixed-effects models.

The term "mixed" refers to the combination of:

  • Fixed effects — population-level parameters.
  • Random effects — subject-specific deviations from the population parameters.

For a clinical trial, the fixed effects might include:

  • Treatment group
  • Time
  • Treatment-by-time interaction
  • Baseline covariates
  • Other prespecified prognostic factors

The random effects typically account for repeated measurements within patients.

Random Intercept Growth Curve

The simplest mixed growth curve allows patients to have different intercepts but assumes a common slope.

\[ Y_{ij} = \beta_0+\beta_1t_{ij}+b_{0i}+\varepsilon_{ij} \]

The random intercept satisfies: \[ b_{0i}\sim N(0,\sigma_b^2) \]

This means patients can start at different levels, but they share the same average rate of change.

For example, suppose a patient's baseline systolic blood pressure is higher than average. The random intercept captures that patient's elevated starting point.

When is a random intercept reasonable? A random-intercept model is useful when patients differ substantially in their starting levels but there is little evidence that they require substantially different slopes.

Random Intercept and Random Slope Model

A more flexible growth curve allows both the starting point and rate of change to vary between patients.

\[ Y_{ij} = \beta_0+\beta_1t_{ij} +b_{0i}+b_{1i}t_{ij} +\varepsilon_{ij} \]

The random effects are usually modeled jointly:

\[ \begin{pmatrix} b_{0i}\\ b_{1i} \end{pmatrix} \sim N \left[ \begin{pmatrix} 0\\ 0 \end{pmatrix}, \begin{pmatrix} \sigma_0^2 & \sigma_{01}\\ \sigma_{01} & \sigma_1^2 \end{pmatrix} \right] \]

The covariance term \(\sigma_{01}\) describes whether patients with higher starting values tend to have higher or lower slopes.

The corresponding correlation is:

\[ \rho_{01} = \frac{\sigma_{01}} {\sigma_0\sigma_1} \]

Why Random Intercepts and Slopes Matter

Suppose patients with high baseline disease severity tend to improve faster. A random intercept alone cannot represent that relationship. A random intercept and slope model can.

The model can capture:

  • Different baseline levels.
  • Different rates of change.
  • Correlation between baseline level and rate of change.

This is one of the major advantages of growth curve modeling over a simple ordinary regression of outcome on time.

A Clinical Trial Example

Suppose a randomized clinical trial compares a new treatment with placebo. A continuous disease-severity score is measured at:

Visit Time Outcome
Baseline 0 Disease score
Week 4 4 Disease score
Week 8 8 Disease score
Week 12 12 Disease score

The scientific question is whether the treatment changes the trajectory of the disease score.

A basic model might be:

\[ Y_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2T_i + \beta_3(t_{ij}\times T_i) + b_{0i} + b_{1i}t_{ij} + \varepsilon_{ij} \]

where \(T_i=1\) for active treatment and \(T_i=0\) for placebo.

Interpreting the Fixed Effects

The coefficients have an intuitive interpretation when time is coded from baseline.

Parameter Interpretation
\(\beta_0\) Mean baseline outcome in the reference group
\(\beta_1\) Mean time slope in the reference group
\(\beta_2\) Baseline treatment-group difference
\(\beta_3\) Difference in slopes between treatment groups

The most important coefficient for comparing longitudinal trajectories is often the time-by-treatment interaction.

Clinical interpretation: The treatment-by-time interaction asks whether the treatment group changes over time at a different rate than the reference group.

Why the Treatment-by-Time Interaction Is Critical

Suppose: \[ \beta_3=-0.40 \]

Then the active treatment group has a slope that is 0.40 units lower per unit of time than the placebo group.

If lower scores represent improvement, this indicates a faster improvement trajectory under treatment.

For example, if the placebo slope is: \[ \beta_1=0.10 \] then the treatment slope is: \[ \beta_1+\beta_3 = 0.10-0.40 = -0.30 \]

Thus, the placebo group increases by 0.10 units per time unit, while the treatment group decreases by 0.30 units per time unit.

Time Can Be Categorical or Continuous

One of the most important modeling decisions is how to represent time.

Time can be treated as:

  • A continuous variable
  • A categorical visit factor
  • A polynomial function
  • A spline
  • Another clinically meaningful transformation

These choices answer somewhat different scientific questions.

Continuous Time

With continuous time:

\[ Y_{ij}=\beta_0+\beta_1t_{ij}+\varepsilon_{ij} \]

the model assumes a linear trajectory.

This is attractive when the outcome is expected to change approximately linearly over the study period.

Categorical Time

With categorical time, each visit receives its own estimated mean.

This avoids imposing a linear trajectory.

For example:

\[ Y_{ij} = \beta_0 + \beta_1I(t=4) + \beta_2I(t=8) + \beta_3I(t=12) + \cdots \]

This approach is common in clinical trials because treatment differences can be estimated separately at each scheduled visit.

Linear Time Versus Categorical Visit

Approach Advantage Limitation
Continuous linear time Parsimonious and easy to interpret Assumes linear change
Categorical visit Flexible trajectory Requires more parameters
Polynomial time Can represent curvature Higher-order terms can be difficult to interpret
Spline time Flexible smooth trajectory More modeling decisions are required
Practical rule: Do not use a linear time effect simply because it is mathematically convenient. The functional form of time should be justified by the scientific question, observed trajectory, study design, and prespecified analysis strategy.

Polynomial Growth Curves

Some clinical outcomes do not change linearly. For example, an outcome may improve rapidly after treatment and then plateau. A quadratic model can represent this curvature:

\[ Y_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2t_{ij}^2 + b_{0i} + b_{1i}t_{ij} + \varepsilon_{ij} \]

If \(\beta_2\) is nonzero, the trajectory is curved rather than a straight line.

However, polynomial coefficients are often difficult to interpret clinically. The model may therefore be useful for prediction while still requiring careful presentation of estimated trajectories.

Splines for Flexible Growth Curves

Splines provide another way to model nonlinear trajectories. Instead of forcing the outcome to follow one global polynomial, the trajectory can bend at selected knots.

A general spline model can be written:

\[ Y_{ij} = \beta_0 + \sum_{k=1}^{K}\beta_k B_k(t_{ij}) + \text{random effects} + \varepsilon_{ij} \]

where \(B_k(t)\) are spline basis functions.

Splines can be particularly useful when clinical improvement is expected to be rapid initially and slower later.

Centering Time

The choice of where time equals zero has an important effect on interpretation.

If time is centered at baseline: \[ t=0 \]

then the intercept represents the estimated baseline mean.

If time is centered at Week 12: \[ t=0 \]

then the intercept represents the estimated mean at Week 12.

Centering does not change the underlying fitted trajectory. It changes the parameterization and therefore changes the interpretation of the intercept and correlations among model parameters.

Why Baseline-Centered Time Is Often Useful

Suppose baseline is coded as zero:

\[ t=0,4,8,12 \]

Then:

\[ E(Y\mid T=0,t=0)=\beta_0 \]

and:

\[ E(Y\mid T=1,t=0)=\beta_0+\beta_2 \]

This makes the treatment coefficient interpretable as the baseline difference between groups.

In a randomized trial, a baseline treatment difference is generally expected to be close to zero, although sampling variability means it need not be exactly zero.

Random Effects and Covariance

The random-effects covariance matrix is central to growth curve modeling. For a random intercept and random slope:

\[ G= \begin{pmatrix} \sigma_0^2 & \sigma_{01}\\ \sigma_{01} & \sigma_1^2 \end{pmatrix} \]

The diagonal elements represent variability in:

  • Patient-specific intercepts.
  • Patient-specific slopes.

The off-diagonal element represents covariance between intercepts and slopes.

Interpreting the Intercept-Slope Correlation

Suppose the estimated correlation is negative. This means patients with higher predicted starting values tend to have more negative slopes.

In a disease-severity scale where decreasing values indicate improvement, this could mean that patients who begin with more severe disease tend to improve more rapidly.

However, the correlation should be interpreted carefully.

A strong intercept-slope correlation can sometimes arise from the choice of time origin and from limited follow-up.

Modeling tip: Centering time near the middle of the observation period can sometimes improve the numerical behavior and interpretability of random intercept and slope models, although baseline-centered time may be more clinically meaningful.

Residual Correlation in Longitudinal Data

Even after including random effects, repeated observations from the same patient may have residual correlation.

A general longitudinal model can be written:

\[ \mathbf{Y}_i = X_i\beta + Z_i b_i + \varepsilon_i \]

where:

  • \(\mathbf{Y}_i\) is the vector of repeated observations for patient \(i\).
  • \(X_i\beta\) is the fixed-effects component.
  • \(Z_i b_i\) is the random-effects component.
  • \(\varepsilon_i\) is the residual vector.

The residual covariance matrix is often denoted \(R_i\).

The marginal covariance of the observations is then:

\[ V_i = Z_iGZ_i^\top+R_i \]

This equation is fundamental to understanding mixed models. The covariance among repeated observations can arise from both random effects and residual correlation.

Common Covariance Structures

Structure Basic Assumption Typical Use
Independent Repeated residuals are independent Rarely adequate for strongly longitudinal data
Compound symmetry Equal variances and equal correlations Simple repeated-measures settings
AR(1) Correlation decreases with time separation Approximately equally spaced visits
Unstructured Every variance and covariance estimated separately Flexible settings with manageable numbers of visits
Toeplitz Correlation depends on lag Repeated measurements with similar lag behavior

Random Effects Versus Residual Covariance

These concepts are related but not identical.

Random effects explain subject-level heterogeneity in trajectory parameters. Residual covariance describes dependence that remains after accounting for those random effects.

For example, a random intercept produces correlation because observations from the same patient share the same patient-specific intercept.

A random slope produces additional correlation that depends on time.

This is why the random-effects specification itself induces a particular longitudinal covariance pattern.

Growth Curve With Treatment

Consider a two-arm trial with:

  • Placebo = reference group.
  • Active treatment = indicator \(T=1\).

A random intercept and slope model is:

\[ Y_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2T_i + \beta_3t_{ij}T_i + b_{0i} + b_{1i}t_{ij} + \varepsilon_{ij} \]

The placebo trajectory is:

\[ E(Y\mid T=0) = \beta_0+\beta_1t \]

The treatment trajectory is:

\[ E(Y\mid T=1) = (\beta_0+\beta_2) + (\beta_1+\beta_3)t \]

Therefore the treatment difference at time \(t\) is:

\[ \Delta(t) = \beta_2+\beta_3t \]

This equation is particularly useful. It shows that the treatment difference changes as a function of time when the interaction is present.

A Numerical Example

Suppose the fitted model produces:

Parameter Estimate
\(\beta_0\) 70.0
\(\beta_1\) 0.20
\(\beta_2\) -1.0
\(\beta_3\) -0.50

The placebo trajectory is:

\[ 70.0+0.20t \]

The treatment trajectory is:

\[ 69.0-0.30t \]

At Week 4:

\[ \Delta(4) = -1.0+(-0.50)(4) = -3.0 \]

At Week 12:

\[ \Delta(12) = -1.0+(-0.50)(12) = -7.0 \]

Thus the estimated treatment advantage becomes larger over time.

Important distinction: A treatment-by-time interaction is about differences in trajectories. It is not the same thing as simply comparing treatment groups at one final visit.

Growth Curves and Baseline Adjustment

Clinical trials often have an important baseline measurement. There are several ways to incorporate baseline information.

One approach is to model the outcome at each post-baseline visit while adjusting for baseline as a covariate.

Another approach is to model change from baseline.

A third approach is to include baseline as part of the longitudinal outcome sequence.

These approaches are not automatically equivalent in interpretation.

Protocol principle: The primary longitudinal estimand and baseline strategy should be specified before the analysis rather than selected after examining which model produces the most favorable result.

Change From Baseline Growth Curves

Suppose: \[ C_{ij}=Y_{ij}-Y_{i0} \]

where \(C_{ij}\) is change from baseline. A simple growth curve for change might be:

\[ C_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2T_i + \beta_3t_{ij}T_i + b_{0i} + b_{1i}t_{ij} + \varepsilon_{ij} \]

If baseline is not included as an outcome observation, the intercept now has a different interpretation.

This is one reason model parameterization must be described carefully in the statistical analysis plan.

Growth Curve Models With Unequal Visit Times

One major advantage of continuous-time growth curve models is that they do not require every patient to have measurements at exactly the same times.

For example, patients might have observations at:

  • Day 0
  • Day 27
  • Day 61
  • Day 92

rather than exactly Days 0, 30, 60, and 90.

A continuous time variable can use the actual measurement time.

\[ Y_{ij} = \beta_0+\beta_1t_{ij}+b_{0i}+b_{1i}t_{ij}+\varepsilon_{ij} \]

This is often preferable to forcing irregular measurements into artificial visit categories when the scientific question concerns the trajectory as a function of elapsed time.

Missing Data in Growth Curve Models

Longitudinal clinical trials commonly have missing observations. A patient may:

  • Miss a scheduled visit.
  • Withdraw from treatment.
  • Discontinue because of an adverse event.
  • Move to another treatment.
  • Become lost to follow-up.

A major advantage of likelihood-based mixed models is that they can use available repeated observations without requiring every patient to have a complete trajectory.

Under appropriate assumptions, maximum likelihood or restricted maximum likelihood can provide valid inference without simple complete-case deletion.

But missingness is not automatically solved. A mixed model does not make missing data ignorable by itself. Inference depends on assumptions about the missing-data mechanism and the correctness of the model.

MCAR, MAR, and MNAR

The standard likelihood framework for many longitudinal mixed models is often motivated by a missing at random (MAR) assumption.

Very roughly:

  • MCAR: missingness does not depend on observed or unobserved outcomes.
  • MAR: missingness can depend on observed information after conditioning on relevant covariates and history.
  • MNAR: missingness may depend on unobserved values even after conditioning on observed information.

Sensitivity analyses may be required when departures from MAR could materially affect conclusions.

Growth Curve Modeling Is Not Imputation

A common misconception is that mixed models first "fill in" missing values and then perform an ordinary analysis.

That is not generally how likelihood-based mixed models work.

The model estimates its parameters using the observed data while integrating over the unobserved portions of the subject-specific trajectory according to the specified probability model.

Key point: A mixed model can use incomplete longitudinal records without creating a single deterministic replacement value for every missing observation.

Estimating Growth Curves in R

The lme4 package provides a common framework for linear mixed-effects models in R.

Suppose the data contain:

  • id — patient identifier
  • time — time from baseline
  • treatment — treatment group
  • outcome — continuous longitudinal endpoint

A random-intercept growth curve can be fitted with:

library(lme4)

fit_ri <- lmer(
  outcome ~ time * treatment +
    (1 | id),
  data = dat,
  REML = TRUE
)

summary(fit_ri)

The term:

(1 | id)

allows each patient to have a different intercept.

Random Intercept and Random Slope in R

A random-slope growth curve is:

fit_rs <- lmer(
  outcome ~ time * treatment +
    (1 + time | id),
  data = dat,
  REML = TRUE
)

summary(fit_rs)

The expression:

(1 + time | id)

allows each patient to have both:

  • A unique intercept.
  • A unique time slope.

By default, the random intercept and random slope are also allowed to correlate.

Uncorrelated Random Effects

Sometimes an investigator may want to fit a model in which the random intercept and random slope are assumed independent. In lme4, this can be written:

fit_uncorrelated <- lmer(
  outcome ~ time * treatment +
    (1 | id) +
    (0 + time | id),
  data = dat,
  REML = TRUE
)

This model has the same basic random intercept and slope components but removes their covariance parameter.

Inspecting the Random Effects

VarCorr(fit_rs)

This provides estimates of the random-effects variances and covariance.

The estimated patient-specific effects can also be extracted:

ranef(fit_rs)

These estimates are often called empirical best linear unbiased predictors, or BLUPs.

Important: Patient-specific random-effect estimates are shrunk toward the population mean. A patient with only a small amount of information will generally have more strongly shrunk random-effect estimates than a patient with extensive repeated measurements.

Fixed Effects in R

fixef(fit_rs)

The output might look conceptually like:

Term Estimate Interpretation
(Intercept) 70.0 Reference-group outcome at time zero
time 0.20 Reference-group slope
treatmentActive -1.0 Baseline group difference
time:treatmentActive -0.50 Difference in slopes

Estimating Predicted Trajectories

A growth curve is often easier to understand graphically than through a table of coefficients.

For example:

newdat <- expand.grid(
  time = seq(0, 12, by = 1),
  treatment = levels(dat$treatment)
)

newdat$pred <- predict(
  fit_rs,
  newdata = newdat,
  re.form = NA
)

The argument:

re.form = NA

requests population-level predictions rather than predictions conditional on individual patient random effects.

Plotting the Estimated Growth Curves

library(ggplot2)

ggplot(newdat,
       aes(x = time,
           y = pred,
           group = treatment)) +
  geom_line(linewidth = 1) +
  labs(
    x = "Time",
    y = "Predicted outcome",
    group = "Treatment"
  ) +
  theme_minimal()

A trajectory plot can immediately reveal whether:

  • The treatment groups start at similar levels.
  • The groups separate over time.
  • The trajectories are approximately linear.
  • The treatment effect appears delayed.
  • The treatment effect appears transient.

Confidence Intervals for Growth Curves

Point estimates alone are not sufficient. The uncertainty surrounding the estimated trajectory should also be displayed.

Depending on the analysis framework, confidence intervals can be generated using:

  • Model-based standard errors.
  • Parametric simulation.
  • Bootstrap methods.
  • Appropriate marginal-estimation tools.

For clinical reporting, estimated means or treatment differences with confidence intervals are usually more informative than displaying only raw individual trajectories.

Testing the Overall Time Effect

The time effect addresses whether the outcome changes over time in the reference group, depending on model parameterization.

For a linear trajectory: \[ H_0:\beta_1=0 \]

versus: \[ H_A:\beta_1\ne0 \]

However, in a clinical trial, the more important question is often whether the treatment groups have different trajectories.

That is addressed by the interaction.

Testing the Treatment-by-Time Interaction

For a linear growth curve: \[ H_0:\beta_3=0 \]

versus: \[ H_A:\beta_3\ne0 \]

Rejecting \(H_0\) suggests that the treatment groups have different slopes.

But this does not necessarily tell you the treatment difference at every clinical visit.

Estimated contrasts at clinically relevant times should usually accompany the overall interaction test.

Estimated Treatment Difference at Each Visit

Recall: \[ \Delta(t)=\beta_2+\beta_3t \]

For baseline: \[ \Delta(0)=\beta_2 \]

For Week 4: \[ \Delta(4)=\beta_2+4\beta_3 \]

For Week 12: \[ \Delta(12)=\beta_2+12\beta_3 \]

This provides a clinically interpretable sequence of treatment differences.

Best practice: Do not report only "the interaction was statistically significant." Translate the model into estimated treatment differences at clinically relevant times, with confidence intervals.

Growth Curve Versus Repeated-Measures ANOVA

Growth curve models are closely related to repeated-measures ANOVA but provide substantially more flexibility.

Feature Traditional Repeated-Measures ANOVA Growth Curve Model
Unequal observation times Limited Flexible
Random slopes Not naturally represented Yes
Unequal numbers of observations Problematic in classical forms Can be accommodated
Covariance flexibility Often restrictive High
Continuous time Limited Natural
Individual trajectories Limited Explicitly modeled

Growth Curves and GEE Are Not the Same

Another important distinction is between mixed-effects growth models and generalized estimating equations, or GEE.

Mixed models explicitly model subject-specific random effects and the probability distribution of the outcome.

GEE primarily estimates population-average effects while accounting for within-subject correlation through a working correlation structure.

Feature Mixed Growth Model GEE
Subject-specific random effects Yes No
Population-average inference Can be obtained Primary focus
Individual trajectories Natural Not primary
Random slopes Yes Not in the same sense
Prediction of subject trajectories Yes Not the main objective

Subject-Specific Versus Population-Average Effects

This distinction becomes especially important for non-Gaussian outcomes. For a continuous Gaussian outcome, the distinction between conditional and marginal interpretations can be less dramatic. For binary or count outcomes using generalized mixed models, however, subject-specific and population-average effects can differ substantially.

Therefore, the interpretation of a growth curve coefficient depends not only on the coefficient itself but also on the model class.

Non-Gaussian Growth Curves

Growth curve ideas can be extended beyond continuous normally distributed outcomes. Examples include:

  • Binary longitudinal outcomes.
  • Counts over time.
  • Ordinal symptom categories.
  • Proportions or rates.

For a binary outcome, a generalized linear mixed model might use:

\[ \operatorname{logit}\{P(Y_{ij}=1)\} = \beta_0+\beta_1t_{ij} +\beta_2T_i +\beta_3t_{ij}T_i +b_{0i} +b_{1i}t_{ij} \]

The same conceptual structure remains:

  • Time defines the trajectory.
  • Treatment modifies the trajectory.
  • Random effects represent patient-level heterogeneity.

The interpretation, however, is now on the log-odds scale unless transformed to predicted probabilities or another clinically meaningful scale.

Choosing the Random-Effects Structure

One of the most important practical decisions is whether to include:

  • Random intercept only.
  • Random intercept plus random slope.
  • Additional random polynomial terms.

A random slope is particularly attractive when the scientific question recognizes that patients may improve at different rates.

However, a more complex random-effects structure is not automatically better.

Do not add random effects solely because they reduce a model criterion. The random-effects structure should be supported by the longitudinal design, scientific understanding, sufficient repeated observations, and model diagnostics.

Singular Fits

Complex mixed models can produce a warning about a singular fit.

This can occur when the estimated random-effects covariance structure is effectively on the boundary of the parameter space. For example, the estimated random-slope variance may be extremely small.

A singular fit is a signal that the specified random-effects structure may be too complex for the available data.

Possible considerations include:

  • Whether the random slope is scientifically necessary.
  • Whether enough repeated measurements exist.
  • Whether time has been sensibly centered or scaled.
  • Whether the random intercept-slope correlation is estimable.

The solution should not be to ignore the warning.

Scaling Time

If time is measured in days and the study lasts several years, numerical scaling can become useful. For example:

dat$time_years <- dat$time_days / 365.25

or:

dat$time_weeks <- dat$time_days / 7

The underlying scientific trajectory is unchanged, but the coefficient now represents change per year or per week rather than change per day.

Model Diagnostics

A growth curve model should not be accepted simply because the optimizer converges. Important diagnostics include:

  • Residual behavior.
  • Normality of residuals when appropriate.
  • Influential observations.
  • Random-effect distributions.
  • Evidence of nonlinear time effects.
  • Covariance adequacy.
  • Convergence and singularity.
  • Predicted versus observed trajectories.

Residual Diagnostics in R

plot(fit_rs)

A residual-versus-fitted plot can reveal:

  • Nonlinearity.
  • Heteroscedasticity.
  • Outlying observations.
  • Systematic model misspecification.

Normal Q-Q plots can be inspected with:

qqnorm(residuals(fit_rs))
qqline(residuals(fit_rs))

Random-effect diagnostics can be explored with:

qqnorm(ranef(fit_rs)$id[,1])
qqline(ranef(fit_rs)$id[,1])

Heteroscedasticity

The simplest linear mixed model assumes constant residual variance: \[ \operatorname{Var}(\varepsilon_{ij})=\sigma^2 \]

Clinical longitudinal data may violate this assumption. For example, variability might increase with disease severity or differ between visits.

In such settings, a more flexible variance model may be appropriate.

The ability to specify heteroscedastic residual structures depends on the software and modeling framework.

Growth Curve Modeling With Nonlinear Clinical Response

Many treatment responses are not linear. A common pattern is:

1
Early response: rapid improvement after treatment begins.
2
Intermediate period: rate of improvement slows.
3
Plateau: the treatment effect stabilizes.

A straight-line model may therefore provide a poor description of the true clinical trajectory.

Possible alternatives include:

  • Quadratic growth curves.
  • Cubic models.
  • Restricted cubic splines.
  • Piecewise linear models.
  • Mechanistically motivated nonlinear mixed models.

Piecewise Linear Growth Curves

Suppose a treatment produces rapid improvement through Week 4 followed by a slower trajectory. A piecewise model can use a knot at Week 4.

Define: \[ (t-4)_+=\max(0,t-4) \]

Then:

\[ Y_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2(t_{ij}-4)_+ + \varepsilon_{ij} \]

Before Week 4, the slope is: \[ \beta_1 \]

After Week 4, the slope is: \[ \beta_1+\beta_2 \]

This can be highly interpretable when there is a clinically meaningful change point.

Growth Curves and Time-by-Treatment-by-Time Complexity

For nonlinear treatment trajectories, a treatment-by-time interaction may need to be expanded. For example:

\[ Y_{ij} = \beta_0 + \beta_1t + \beta_2t^2 + \beta_3T + \beta_4tT + \beta_5t^2T + \text{random effects} + \varepsilon \]

Now the treatment can alter both the initial slope and the curvature.

This is powerful but substantially harder to interpret.

Interpretation strategy: For nonlinear models, focus on predicted trajectories and treatment contrasts at clinically meaningful times rather than interpreting every polynomial coefficient in isolation.

Model Selection

Potential criteria include:

  • Akaike Information Criterion (AIC).
  • Bayesian Information Criterion (BIC).
  • Likelihood ratio tests for appropriate nested models.
  • Residual diagnostics.
  • Scientific plausibility.
  • Interpretability.

However, model selection should not become a fishing exercise.

For confirmatory clinical trials, important structural decisions should generally be prespecified.

REML Versus Maximum Likelihood

For linear mixed models, two common estimation approaches are:

  • Maximum likelihood (ML).
  • Restricted maximum likelihood (REML).

REML is often preferred for estimating variance components because it accounts for the estimation of fixed effects.

However, when comparing models with different fixed-effects structures using likelihood ratio tests, ML is generally used rather than REML.

For example:

fit1 <- lmer(
  outcome ~ time + treatment +
    (1 + time | id),
  data = dat,
  REML = FALSE
)

fit2 <- lmer(
  outcome ~ time * treatment +
    (1 + time | id),
  data = dat,
  REML = FALSE
)

anova(fit1, fit2)
Practical distinction: Do not compare models with different fixed effects using REML likelihoods. Use ML when the fixed-effects specification is being compared.

Degrees of Freedom and Inference

Mixed-model inference requires attention to how standard errors and degrees of freedom are calculated.

Different software packages may use different approximations. Common approaches include:

  • Satterthwaite approximations.
  • Kenward-Roger approximations.
  • Likelihood-ratio tests.
  • Wald tests.
  • Parametric bootstrap methods.

For confirmatory analyses, the method used should be explicitly documented.

Growth Curve Models in SAS

SAS users commonly fit linear mixed models with PROC MIXED. A simple random-intercept model is:

proc mixed data=clinical method=reml;
    class id treatment;

    model outcome =
        time
        treatment
        time*treatment
        / solution ddfm=kr;

    random intercept / subject=id;
run;

A random intercept and slope model is:

proc mixed data=clinical method=reml;
    class id treatment;

    model outcome =
        time
        treatment
        time*treatment
        / solution ddfm=kr;

    random intercept time /
        subject=id
        type=un;
run;

Here type=un allows the random intercept and slope to have separate variances and a covariance.

Residual Covariance in SAS

A repeated statement can be used when modeling residual covariance. For example:

proc mixed data=clinical method=reml;
    class id treatment visit;

    model outcome =
        treatment
        visit
        treatment*visit
        / solution ddfm=kr;

    repeated visit /
        subject=id
        type=ar(1);
run;

An unstructured covariance can be specified as:

repeated visit /
    subject=id
    type=un;

The appropriate covariance structure depends on the scientific and statistical characteristics of the data.

Random Effects and Repeated Covariance Are Different Modeling Choices

A common mistake is to treat the random-effects structure and residual covariance structure as interchangeable. They are not.

A model can include:

  • Random intercepts.
  • Random slopes.
  • Residual AR(1) correlation.
  • Heterogeneous residual variances.

The resulting covariance model can therefore be substantially richer than a simple random-intercept specification.

Growth Curve Model as a Covariance Model

The random-effects representation provides a useful way to understand why repeated measurements are correlated. Suppose: \[ Y_{ij} = \beta_0+\beta_1t_{ij} +b_{0i}+b_{1i}t_{ij} +\varepsilon_{ij} \]

Then the covariance between two observations at times \(t_j\) and \(t_k\) for the same patient is:

\[ \operatorname{Cov}(Y_{ij},Y_{ik}) = \sigma_0^2 + (t_j+t_k)\sigma_{01} + t_jt_k\sigma_1^2 \]

This demonstrates that random slopes create a covariance pattern that depends on the measurement times.

Growth Curve Models and Endpoint Analysis

A longitudinal growth curve can be the primary model when the scientific question concerns the trajectory itself. However, many clinical trials still specify a particular visit as the primary time point.

For example:

  • Primary endpoint: Week 12 treatment difference.
  • Secondary objective: characterize the trajectory over Weeks 0–12.

In that setting, the growth curve model can provide a coherent framework for estimating the Week 12 difference while also using information from the entire longitudinal record.

Marginal Means and Estimated Contrasts

Suppose the model is:

\[ Y=\beta_0+\beta_1t+\beta_2T+\beta_3tT+\cdots \]

The estimated treatment difference at time \(t\) is:

\[ \Delta(t)=\beta_2+\beta_3t \]

For categorical visits, estimated marginal means can instead be obtained for each treatment-by-visit combination.

This often produces a much more clinically useful presentation than reporting only raw model coefficients.

Confidence Intervals Are Essential

Suppose the estimated Week 12 treatment difference is: \[ -7.0 \]

A clinically meaningful report should also provide its uncertainty, such as a 95% confidence interval.

For example:

Visit Estimated Difference 95% CI
Week 4 -3.0 -5.2 to -0.8
Week 8 -5.0 -7.6 to -2.4
Week 12 -7.0 -10.1 to -3.9

This makes the clinical evolution of the treatment effect much easier to understand.

Growth Curve Plots Should Usually Accompany Tables

For longitudinal clinical data, visual presentation is particularly valuable. A useful figure can display:

  • Observed individual trajectories.
  • Observed group means.
  • Model-estimated trajectories.
  • Confidence intervals.

However, plotting every individual patient's trajectory can become visually overwhelming with large trials.

For large studies, estimated marginal trajectories with confidence bands are often clearer.

Common Mistakes

  1. Assuming every patient has the same slope. Patients frequently differ substantially in their rates of change.
  2. Using a linear time effect automatically. Clinical trajectories can be nonlinear.
  3. Ignoring treatment-by-time interaction. If treatment effects evolve over time, a single treatment coefficient may be misleading.
  4. Interpreting the intercept without considering time centering. The intercept represents the outcome at the time point coded as zero.
  5. Confusing random-effects covariance with residual covariance. They represent different components of longitudinal dependence.
  6. Using an unnecessarily complex random-effects structure. Overparameterized models may fail to converge or produce unstable estimates.
  7. Relying only on p-values. Estimated trajectories and clinically meaningful treatment contrasts should also be reported.
  8. Assuming mixed models automatically solve missing-data problems. Inference still depends on assumptions about the missing-data mechanism.
  9. Choosing the covariance structure solely by statistical criterion. Scientific plausibility and model diagnostics also matter.
  10. Ignoring convergence warnings. A model that produces estimates is not necessarily a valid model.

A Practical Growth Curve Modeling Workflow

1
Define the longitudinal estimand. Decide whether the primary question concerns an overall trajectory, a specific visit, or both.
2
Understand the measurement schedule. Determine whether visits are equally spaced, irregular, or potentially informative.
3
Explore the raw data. Plot individual and group-level trajectories before selecting the functional form of time.
4
Specify time. Choose continuous, categorical, polynomial, spline, or piecewise time as scientifically appropriate.
5
Specify fixed effects. Include treatment, time, treatment-by-time interactions, and prespecified covariates as appropriate.
6
Specify random effects. Consider whether patients require random intercepts, random slopes, or another trajectory structure.
7
Specify covariance assumptions. Account appropriately for residual dependence and heterogeneity.
8
Fit the model. Use an appropriate estimation method and document software and options.
9
Check diagnostics. Assess residuals, random effects, convergence, singularity, and trajectory adequacy.
10
Estimate clinical contrasts. Translate model coefficients into treatment differences at clinically relevant times.
11
Display the trajectories. Use estimated means, confidence intervals, and clinically interpretable plots.
12
Perform sensitivity analyses. Assess the robustness of conclusions to reasonable alternative covariance, time, and missing-data assumptions.

Worked Example: Disease Score Over 12 Weeks

Consider a randomized trial with 120 patients:

Design Element Value
Placebo 60 patients
Active treatment 60 patients
Visits Baseline, Weeks 4, 8, and 12
Primary longitudinal endpoint Continuous disease-severity score
Lower score Better clinical status

The investigators observe that disease scores tend to decline in the treatment group but remain relatively stable in placebo.

A random intercept and random slope model is specified:

\[ Y_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2T_i + \beta_3t_{ij}T_i + b_{0i} + b_{1i}t_{ij} + \varepsilon_{ij} \]

Suppose the estimates are:

Parameter Estimate
\(\beta_0\) 65.0
\(\beta_1\) 0.10
\(\beta_2\) -0.50
\(\beta_3\) -0.60

The placebo trajectory is:

\[ 65.0+0.10t \]

The treatment trajectory is:

\[ 64.5-0.50t \]

At Week 12, the estimated treatment difference is:

\[ \Delta(12) = -0.50 + (-0.60)(12) = -7.70 \]

Thus the treatment group is estimated to have a disease score approximately 7.7 points lower than placebo at Week 12.

What Does the Random Slope Mean in This Example?

The fixed treatment-by-time interaction describes the difference between the average slopes. The random slope describes how much individual patients vary around their respective average trajectories.

For example, two treated patients may have predicted slopes of:

  • Patient A: \(-0.20\) points per week.
  • Patient B: \(-0.80\) points per week.

Both belong to the same treatment group, but their disease trajectories differ.

The random slope allows the model to represent this heterogeneity rather than forcing every treated patient to improve at exactly the same rate.

Why Individual Trajectories Should Not Be Treated as Independent

Suppose one patient contributes four observations. Those four observations are not four independent patients. They share:

  • The same biological characteristics.
  • The same treatment assignment.
  • The same baseline disease status.
  • Potentially the same measurement-related factors.

Treating all observations as independent can substantially underestimate uncertainty.

Fundamental principle: Repeated measurements from the same patient are correlated. Growth curve models explicitly account for that within-patient dependence.

Growth Curve Models and Clinical Trial Estimands

Modern clinical trials distinguish carefully between the treatment effect being estimated and the statistical method used to estimate it.

A growth curve model can be used to estimate different quantities, such as:

  • Treatment difference in mean outcome at Week 12.
  • Difference in average slope.
  • Difference in trajectory over the entire study period.
  • Area under the outcome trajectory.
  • Probability of achieving a clinically important threshold over time.

These are not interchangeable estimands.

Key principle: Choose the estimand first. Then select a growth curve model that estimates it appropriately.

Area Under the Growth Curve

Sometimes the overall longitudinal burden is more important than the outcome at one particular visit. The area under the curve can be represented as:

\[ AUC = \int_{t_0}^{t_1}Y(t)\,dt \]

For a linear trajectory: \[ Y(t)=\beta_0+\beta_1t \]

the AUC is:

\[ AUC = \beta_0(t_1-t_0) + \frac{\beta_1}{2}(t_1^2-t_0^2) \]

This can provide an interpretable summary when cumulative disease burden or symptom burden is clinically meaningful.

Growth Curve Modeling Versus Change Scores at Each Visit

An investigator could analyze each visit separately using change from baseline. However, this may discard useful information about the trajectory and creates multiple inferential questions.

A growth curve model instead provides one coherent framework for the repeated measurements.

Approach Main Strength Main Challenge
Separate analysis at each visit Simple interpretation Multiple comparisons and inefficient use of longitudinal structure
Growth curve model Models trajectory jointly Requires more modeling assumptions
Summary measure Single clinically interpretable endpoint May discard temporal detail

When Growth Curve Modeling Is Particularly Useful

Growth curve models are especially attractive when:

  • The same continuous outcome is measured repeatedly.
  • Individual trajectories are scientifically meaningful.
  • Patients vary in baseline status.
  • Patients may vary in their rates of change.
  • Incomplete longitudinal records are expected.
  • The treatment effect may evolve over time.
  • The measurement times are not necessarily perfectly balanced.

When a Simple Growth Curve May Be Inadequate

More specialized models may be needed when:

  • The outcome is strongly non-Gaussian.
  • There are multiple distinct latent trajectory classes.
  • The trajectory has abrupt changes.
  • The outcome is bounded or ordinal.
  • Variance changes substantially over time.
  • There are informative dropout processes.
  • The treatment changes the timing of an event rather than a continuous outcome.

Potential alternatives include generalized mixed models, nonlinear mixed models, joint models, latent class growth models, survival models, or pattern-mixture and selection models for missing data.

Growth Mixture Models Are Different

A standard growth curve assumes that patients arise from one population distribution of trajectories. A growth mixture model instead allows multiple latent trajectory classes.

For example, a population might contain:

  • Rapid responders.
  • Moderate responders.
  • Nonresponders.

This can be scientifically interesting but also introduces substantial complexity.

Caution: Latent trajectory classes can be sensitive to modeling choices and should not automatically be interpreted as biologically distinct patient subtypes.

Reporting a Growth Curve Analysis

A high-quality clinical report should describe:

  • The outcome definition.
  • The time scale.
  • The time parameterization.
  • The fixed-effects structure.
  • The random-effects structure.
  • The covariance structure.
  • The estimation method.
  • The handling of missing observations.
  • The inferential method.
  • The primary treatment contrast.
  • Confidence intervals.
  • Sensitivity analyses.

Example Statistical Analysis Plan Language

A concise analysis-plan description might state that the continuous longitudinal endpoint will be analyzed using a linear mixed-effects model containing treatment, visit, and treatment-by-visit interaction as fixed effects, with an appropriate subject-level covariance structure.

If continuous time and random slopes are scientifically justified, the plan could instead specify a random-intercept and random-slope growth curve.

The precise specification should match the study's estimand and protocol rather than being selected solely because one formulation is statistically convenient.

Key Interpretation Checklist

Question What to Examine
Do patients change over time? Time effect or estimated trajectory
Do treatment groups have different trajectories? Treatment-by-time interaction
Do patients start at different levels? Random-intercept variance
Do patients change at different rates? Random-slope variance
Are starting levels associated with rates of change? Intercept-slope covariance/correlation
Is the trajectory nonlinear? Residual diagnostics and trajectory plots
Is within-patient dependence adequately modeled? Covariance specification and diagnostics
What is the clinical treatment effect? Estimated treatment differences at meaningful times

The Most Important Concept

The central idea behind growth curve modeling is simple: patients do not necessarily follow the same longitudinal trajectory.

A useful growth curve model separates three concepts:

1
Population trajectory: fixed effects describe how the average outcome changes over time.
2
Individual trajectory: random effects allow each patient to have their own starting point and, when appropriate, their own rate of change.
3
Within-patient dependence: the covariance structure accounts for the fact that repeated measurements from the same patient are correlated.

In a clinical trial, the treatment-by-time interaction then asks the central question:

Does the treatment change the trajectory of the outcome over time?

That question is often more informative than comparing two isolated means.

Summary

Growth curve modeling provides a flexible framework for analyzing longitudinal clinical data.

The basic model can be written as:

\[ Y_{ij} = \beta_0 + \beta_1t_{ij} + \beta_2T_i + \beta_3t_{ij}T_i + b_{0i} + b_{1i}t_{ij} + \varepsilon_{ij} \]

The fixed effects describe the average trajectory and treatment effect, while the random effects describe patient-level deviations.

The most important practical lessons are:

  • Use growth curves when the trajectory itself is scientifically important.
  • Consider random intercepts when patients differ in baseline levels.
  • Consider random slopes when patients differ in rates of change.
  • Use treatment-by-time interactions when treatment effects may evolve over time.
  • Choose the time scale and functional form deliberately.
  • Distinguish random-effects covariance from residual covariance.
  • Do not ignore missing-data assumptions.
  • Use estimated trajectories and clinically relevant contrasts to interpret results.
  • Check convergence, residuals, random effects, and covariance assumptions.
  • Prespecify important modeling decisions in confirmatory clinical trials.
Bottom line: Growth curve modeling is a powerful extension of the linear mixed-effects framework for longitudinal clinical research. It allows investigators to model the shape of change over time, account for patient-specific starting points and rates of change, test whether treatment alters the trajectory, and use incomplete repeated-measures data under appropriate assumptions. In clinical trials, the most useful interpretation usually comes not from the individual model coefficients alone, but from estimated treatment trajectories and treatment differences at clinically meaningful times.

References

Laird, N.M. & Ware, J.H. (1982). Random-effects models for longitudinal data. Biometrics, 38(4), 963–974.
Diggle, P., Heagerty, P., Liang, K.-Y. & Zeger, S. (2002). Analysis of Longitudinal Data, 2nd ed. Oxford University Press.
Fitzmaurice, G.M., Laird, N.M. & Ware, J.H. (2011). Applied Longitudinal Analysis, 2nd ed. Wiley.
Verbeke, G. & Molenberghs, G. (2000). Linear Mixed Models for Longitudinal Data. Springer.
Pinheiro, J.C. & Bates, D.M. (2000). Mixed-Effects Models in S and S-PLUS. Springer.
West, B.T., Welch, K.B. & Galecki, A.T. (2015). Linear Mixed Models: A Practical Guide Using Statistical Software, 2nd ed. CRC Press.
Fitzmaurice, G., Laird, N. & Ware, J. (2012). Applied Longitudinal Analysis. Wiley.