play icon for videos

Longitudinal data analysis: methods, models, and how to choose

Longitudinal data analysis: mixed-effects models, growth curves, and GEE compared. How to choose the method that fits your research question.

US
Pioneering the best AI-native application & portfolio intelligence platform
Updated
May 3, 2026
360 feedback training evaluation
Use Case
Longitudinal data analysis

Cross-sectional analysis answers what differs. Longitudinal analysis answers what changed. Most teams report the wrong one.

A program manager who runs a paired t-test between intake and follow-up has answered one narrow question. She has not measured how individuals changed, who changed faster than others, or whether the change was driven by the program rather than by time alone. Most longitudinal datasets get analyzed with methods that throw away the structural advantage of having repeated measurements on the same units.

This page covers the methods that take a longitudinal dataset and produce within-unit change estimates: mixed-effects models, growth curves, generalized estimating equations, and the simpler tools that work in narrower settings. Plus how to choose between them, the analytical mistakes that show up in applied work, and what to expect from the software. For the data structure itself, see the longitudinal data sibling page.

On this page
01What individual trajectories look like
02Five definitions readers ask
03Six analytical realities
04Six analytical questions, six methods
05Wrong way vs right way, walked through
06Where longitudinal analysis lives
What the analysis returns

Six trajectories, one population, four things to estimate

Below is the kind of picture a longitudinal analysis produces: each line is one participant's outcome across four waves, and the heavy clay line is the population average. The point is not the chart itself. The point is that the analysis estimates four separate quantities from this data, none of which a paired t-test or a regular regression on stacked rows can recover.

Outcome scores across four waves. One line per participant. Heavy clay line shows population average.
100 75 50 25 0 Wave 1 Intake Wave 2 End of program Wave 3 12-month Wave 4 24-month Outcome score P-04812 Population average Variation in starting level Variation in change rate
Population average
P-04812 (highlighted)
Other participants

Six participants, four waves, one outcome. The four quantities longitudinal analysis estimates from this data are listed below. None of them is reachable from a single before-and-after comparison or from running ordinary regression on stacked rows. The methods on this page differ in how they parameterize these four quantities, but every method has to handle them.

Quantity 1

Population average trajectory

The clay line. The average outcome at each wave, and the average rate of change between waves.

Quantity 2

Variance in starting level

The Wave 1 spread. How much participants differ in baseline outcome before any change happens.

Quantity 3

Variance in change rate

The Wave 4 spread. How much participants differ in how fast they changed across waves.

Quantity 4

Within-person change

Each individual line. How much each participant changed, separately from how the group changed.

Definitions

Five questions readers ask first

Longitudinal data analysis sits at the intersection of three vocabularies: applied program evaluation, biostatistics, and academic social science. The same method has different names depending on the field. The five answers below cover the question forms that bring readers to this page, in plain language and with the field-vocabulary equivalents named where it matters.

What is longitudinal data analysis?

Longitudinal data analysis is the set of statistical methods used to analyze data collected from the same units across multiple time points. The defining feature is that each unit contributes multiple correlated observations rather than one independent observation. Methods that assume independence (paired t-tests, regular regression on stacked rows) produce wrong standard errors when applied to longitudinal data.

Longitudinal analysis methods (mixed-effects models, generalized estimating equations, growth curve models) explicitly account for the within-unit correlation that comes from measuring the same person more than once. The choice between them depends on whether the research question is about individual variation or population averages, on the type of outcome being measured, and on how missing data is handled.

What is longitudinal analysis?

Longitudinal analysis is the broader term covering both the data structure and the methods that work with it. Some writers use it to mean the methods specifically; others use it for the whole research-design-plus-analysis package. In practice, longitudinal analysis refers to the analytical work of producing within-unit change estimates from longitudinal data: how much did each unit change, did units change at different rates, and what predicted the differences.

The term is sometimes used loosely to mean any analysis that involves time. Strictly, longitudinal analysis requires the same units measured at multiple time points. Time-series analysis (one unit, many times) and repeated cross-sections (different units, many times) are different methodological territories.

Longitudinal analysis methods

The four methods most applied teams encounter:

Mixed-effects models (also called multilevel or hierarchical linear models) are the most flexible and most widely used. They include both fixed effects (population-level parameters) and random effects (unit-specific deviations). The typical setup is a random intercept (each unit starts at its own level) plus a random slope (each unit changes at its own rate).

Growth curve models are a specialization of mixed-effects models for trajectory questions. The fixed and random effects are explicitly parameterized as a function of time (linear, quadratic, or piecewise).

Generalized estimating equations (GEE) estimate population-average effects with corrected standard errors. Useful when the research question is about population-level effects rather than individual variation, especially with binary or count outcomes.

Survival analysis methods (Cox proportional hazards, Kaplan-Meier) are the right tool when the outcome is event-time (when did the event happen) rather than a continuous score across waves. Different mathematical machinery, same longitudinal data structure.

Longitudinal data analysis techniques

"Techniques" usually refers to the same set of methods named above, sometimes broken into sub-techniques: random-intercept models versus random-slope models, fixed-effects regression (econometric style) versus mixed-effects regression (biostatistics style), latent growth curve modeling fit through structural equation modeling versus directly through mixed-effects software.

The technique-level choices matter for inference but rarely change the overall conclusion. The bigger choice is which family of methods to use, and that follows from the research question. The methods matrix in section seven below walks through the question-to-method mapping that makes this decision concrete.

Longitudinal trend analysis

Longitudinal trend analysis is the analysis of how a measurement changes across time within the same units. It is a specific application of longitudinal data analysis where the research question is about direction and rate of change rather than about predicting an outcome from covariates. Linear or polynomial growth curve models are the typical method.

Trend analysis can be done at the individual level (each unit gets its own trend) or at the population level (the average trend across units), and longitudinal models can produce both in the same fit. The trend term sometimes also refers to the broader analytical question of "is the outcome changing over time on average," which is answered by the fixed effect of time in any longitudinal model. The worked example below uses linear trend as the entry point.

What it is not

Four analytical methods that get confused with longitudinal analysis

These four methods overlap with longitudinal analysis at the surface but solve different problems. Knowing the difference is what tells you whether the method you reach for actually fits the question you are asking.

Cross-sectional analysis
Different units, one moment

Cross-sectional analysis describes how groups differ at a single time point. Linear regression on a single survey is cross-sectional. It cannot estimate within-person change, only between-person differences. Many "longitudinal" reports are actually cross-sectional analyses run separately at each wave.

Time-series analysis
One unit, many time points

Time-series analysis (ARIMA, exponential smoothing, state-space models) handles one unit observed at many times. The analytical machinery is built for autocorrelation in a single series. It does not handle the multi-unit structure of longitudinal data, where the correlation pattern is within-unit and across-unit observations are independent.

Repeated-measures ANOVA
A predecessor with hard limits

Repeated-measures ANOVA was the standard longitudinal method until mixed-effects models supplanted it. It still works for balanced designs (every unit observed at every wave) with no missing data and no time-varying covariates. Real-world data rarely meets those conditions, which is why mixed-effects models are now the default.

Survival analysis
When did the event happen

Survival analysis (Cox proportional hazards, Kaplan-Meier curves) handles event-time outcomes: when did the participant find a job, when did the disease recur, when did the participant drop out. It is longitudinal but with a different outcome type from the continuous-score case the rest of this page covers.

Six analytical realities

What every longitudinal analysis has to handle

Six things are true about longitudinal data analysis whether the analyst is using R, Stata, SAS, or Python, and whether the project is a workforce evaluation, a clinical trial, or a sociology panel study. Each is the kind of thing that, if missed, produces an analysis that sounds correct and is not.

01 . Dependence

Within-unit dependence is the defining feature

Two measurements from the same person are correlated.

Wave 1 and Wave 2 from the same person are not independent observations. They share everything stable about that person (genetics, history, baseline ability) so they are more similar than two measurements from different people. Methods that assume independence (paired t-tests, regular OLS regression on stacked rows) understate standard errors and overstate significance.


What this changes: the choice of method. Mixed-effects, GEE, and growth curves all handle this; regular regression does not.

02 . Format

Wide format has to be reshaped to long

Most models require one row per unit per wave.

Mixed-effects software, GEE software, and growth curve software all expect long-format input: one row per unit per wave, with columns for unit ID, time, and the measurements. Wide-format data (one row per unit, separate columns per wave) has to be reshaped before any of these methods can run. The reshape happens once at data preparation, not at every model fit.


What this changes: the analysis pipeline order. Reshape is the second step, after structural validation; modeling comes third.

03 . Time

Time can be continuous or discrete

Decide once, model accordingly.

If waves happen at fixed intervals (every 6 months, exactly), time can be modeled as a discrete factor (Wave 1, Wave 2, Wave 3, Wave 4) and the model estimates a separate average for each wave. If waves happen at variable intervals (or at participant-specific dates), time should be continuous in months or years and the model fits a slope. Mixing the two within the same study confuses the interpretation.


What this changes: what the slope coefficient means. Per-wave change is not the same as per-month change.

04 . Missing

Missing data is structural, not incomplete

Drop-outs are not random.

Almost all longitudinal datasets have missing waves. The default response (drop anyone who missed any wave) discards information and biases estimates whenever missingness depends on the outcome. Mixed-effects models handle missing data through full information maximum likelihood, which produces unbiased estimates under the missing-at-random assumption. Multiple imputation handles the not-at-random case.


What this changes: the sample the analysis uses. Complete-case analysis is wrong almost everywhere by default.

05 . Effects

Random effects let units differ

Fixed effects assume they do not.

Random effects in a mixed-effects model represent the fact that each unit can have its own intercept (starting level) and its own slope (change rate). The model estimates the population averages of these plus the variances. Without random effects, the model assumes every unit follows the same trajectory with random noise, which is rarely true. Adding random effects is what makes the model actually longitudinal.


What this changes: what individual variation the model can describe. No random slope means no per-person change rate.

06 . Question

The question dictates the method

Not the other way around.

Mixed-effects models are not always right. GEE is not always right. The method follows from the research question: do we want individual-level estimates or population averages, do we have continuous or binary outcomes, do we have balanced or unbalanced waves, are dropouts random or selective. Answering these first then narrows the method to one or two reasonable choices.


What this changes: the order of decisions. Question first, then method, not the reverse.

Six analytical questions, six methods

Pick the method by naming the question

Every longitudinal analysis starts with one of the six questions below. The "wrong way" column lists the method that gets reached for first because it is familiar and produces a number. The "right way" column lists the method that actually answers the question. The differences are not subtle: the wrong methods cannot answer the question at all in most cases, even when they produce output.

The question
Wrong way
Right way
What it tells you
Did the group's average change?

The simplest longitudinal question

Wrong

A paired t-test on Wave 1 and Wave 4. Discards Waves 2 and 3 entirely. Cannot use any covariates. Drops anyone who missed either of the two waves used.

Right

A mixed-effects model with a fixed effect for time. Uses every wave from every participant who appeared in any wave. Estimates the population-average change rate and its confidence interval.

Whether the analysis uses all the data or only two waves and complete cases.

Did individuals change at different rates?

The variance question

Wrong

Compute each participant's Wave 4 minus Wave 1 difference, then report the standard deviation of those differences. Treats noise from measurement error as if it were real variation in change rate.

Right

A mixed-effects model with a random slope. The variance of the random slope is the actual variance in individual change rates, separated from measurement error and shared trajectory.

Whether the variance estimate reflects real differences in change or includes random noise.

Did baseline level predict change rate?

The intercept-slope correlation question

Wrong

Correlate Wave 1 score with the Wave 4 minus Wave 1 difference. Mathematically biased by regression to the mean: people with low Wave 1 scores look like they gained more, even when no real relationship exists.

Right

A mixed-effects model with random intercept and random slope, reporting the correlation between them. Estimates whether starting high or low actually predicts changing fast or slow, separately from regression-to-the-mean artifacts.

Whether the relationship is real or a statistical artifact.

When did the change happen?

The trajectory shape question

Wrong

Compare first and last wave only and assume linear change in between. Hides whether the change happened entirely between Wave 1 and Wave 2 (training effect) or accumulated gradually across all four waves (sustained gain).

Right

A growth curve model with linear and quadratic time terms, or a piecewise model with breakpoints at meaningful waves. Estimates the actual shape of change and tests whether it is monotonic.

Whether the analysis describes the trajectory or only its endpoints.

Did the treatment affect change?

The intervention-effect question

Wrong

Compute Wave 4 minus Wave 1 difference per participant, then run a t-test of the difference between the treated group and the comparison group. Loses power because waves 2 and 3 are dropped, and assumes the change is fully captured by endpoints.

Right

A mixed-effects model with time, treatment, and a time-by-treatment interaction. The interaction coefficient estimates how the treatment changed the rate of change, using all four waves.

Whether the model can tell the program apart from the secular trend.

Did dropouts leave for systematic reasons?

The missing-data question

Wrong

Drop everyone who missed any wave (complete-case analysis). The remaining sample is biased toward more committed participants, which usually inflates the estimated change rate. Reports a sample size much smaller than what was collected.

Right

Use a method that handles missing-at-random data: full information maximum likelihood (built into mixed-effects software) or multiple imputation. Run sensitivity checks under not-at-random assumptions if attrition was high.

Whether the estimates generalize beyond the most committed participants.

The pattern across all six

The wrong methods all share one habit: they collapse longitudinal structure into a single number per participant, then run cross-sectional methods on the collapsed data. The right methods all share the opposite habit: they keep the longitudinal structure intact and let the model use every wave, every participant, every covariate. The cost is one familiarity step, not one technical step. Mixed-effects models are not harder to fit than t-tests once the data is in long format and the modeler has fit one before.

A worked example

The same data, two analyses, two different conclusions

Below is a workforce-training cohort: 320 participants, four waves, the same dataset that runs through the longitudinal-data sibling page. Two analyses are run on it. The first uses the method most applied teams reach for first. The second uses the method that actually fits the question. Both analyses are run on the same data. The conclusions differ.

Funder reports were due in three weeks. The cohort had completed all four waves of skill assessment and we needed a number for the headline finding. The board chair wanted to know if the program worked. The simplest path was a paired t-test on Wave 1 versus Wave 4. The number was statistically significant and the slide deck was ready in an afternoon. The methodology committee asked, two weeks later, whether the training-only participants had changed faster than the wait-list comparison group. The paired t-test could not answer that. Re-running the analysis as a mixed-effects model, with all four waves and the comparison group, took another three days and changed the headline.

Senior evaluation analyst, social-impact program, end of reporting cycle

Two analyses, the same 320 participants

Both analyses run on the workforce-training cohort introduced in the longitudinal-data sibling page. Outcome is the skill-assessment score, ranged 0 to 100. Treatment is the program; the comparison group is wait-list participants who completed the same assessments without the program.

Analysis 1
Paired t-test on Wave 1 vs Wave 4
What the model reports

mean(W4 - W1) = +18.2 points
t(241) = 14.7, p < 0.001

What it says: Participants who completed both Wave 1 and Wave 4 gained an average of about 18 points across the program. The gain is statistically significant.

Sample used

242 of 320 participants (75%). Anyone missing Wave 1 or Wave 4 is dropped, regardless of whether they completed Waves 2 and 3.

Analysis 2
Mixed-effects model with random slope and treatment interaction
What the model reports

fixed effects:
  wave: +5.8 pts/wave
  wave x treatment: +3.4 pts/wave
random effects:
  intercept SD: 9.1 pts
  slope SD: 2.6 pts/wave

What it says: The whole cohort improved about 6 points per wave; the treated group improved about 3 points per wave faster than the comparison. Individual change rates varied substantially around the average.

Sample used

All 320 participants who appeared in any wave. Includes the 78 with missing waves through full information maximum likelihood.

What the paired t-test cannot tell you

Four blind spots

Whether the program caused the change

A pre-post gain could come from the program, from time alone, or from anything else that changed between waves. Without a comparison group in the model, the gain is descriptive only.

When the change happened

Wave 1 to Wave 4 jumped 18 points, but Wave 2 and Wave 3 are invisible. The change could have happened entirely in the first six months, or accumulated steadily.

Who changed faster than others

The mean is one number. Individual change rates ranged from negative to over 30 points across this cohort. The mean hides which participants gained the most and what predicted being in that group.

What the 78 missing-wave participants would have shown

The t-test drops them entirely. If they dropped out because they were doing badly, the surviving sample looks better than the full sample, which inflates the headline gain.

What the mixed-effects model adds

Four estimates

A program effect, separated from time

The wave-by-treatment interaction is the program effect, after subtracting the change the comparison group made. About half the headline gain is the program; the rest is time and shared trajectory.

A trajectory shape

The model uses all four waves. With a quadratic time term added, the analyst can test whether the change was front-loaded (Waves 1-2), gradual (linear), or back-loaded (Waves 3-4).

Real variance in change rate

The random-slope SD is 2.6 points per wave. Two-thirds of participants gained between 3 and 9 points per wave. Identifying who fell into which range opens up follow-up analyses on what predicted faster change.

All 320 participants in the analysis

Full information maximum likelihood uses every observed wave from every participant. The 78 with missing waves contribute the data they did provide. The estimate generalizes to the cohort, not to the most committed members.

The structural point

Both analyses ran on the same dataset. The conclusions differ because the methods extract different quantities from the same numbers. The paired t-test answered "did the average change," and only that. The mixed-effects model answered "did the program work, when did the change happen, who changed faster, and how does the answer hold up under realistic assumptions about dropouts." Neither analysis was wrong about what it set out to do. Only one of them set out to answer the question the funder was asking.

Where longitudinal analysis lives

Three fields, the same methods, different conventions

Mixed-effects models, growth curves, and GEE are used across program evaluation, health and clinical research, and behavioral and social science. The math is identical across the three fields. The vocabulary, the reporting standards, and the default assumptions differ. Knowing the conventions in the field producing or consuming the analysis is what tells you whether the methods on this page need any adaptation for your specific work.

01

Program evaluation

Workforce, education, social-impact, and philanthropy programs. Unit: participant. Outcome: skill, employment, wage, well-being.

Analytical conventionsProgram evaluation analysts work with cohorts of a few hundred to a few thousand participants tracked across two to five waves. The default question is "did the program work," which usually means "did the treated participants change at a different rate than the comparison group." Mixed-effects models with a wave-by-treatment interaction are the right method, but reporting often stays at the level of pre-post means because that is what funders ask for. The methodologically aware shop reports both: the headline gain and the disaggregated mixed-effects estimates that explain where the gain came from.

Where decisions get made differentlyProgram evaluation analysts often have to decide whether a wait-list comparison group counts as a real comparison. They have to choose between fixed-effects regression (econometric tradition) and mixed-effects regression (biostatistics tradition); the two produce similar answers in most cases but differ on how they handle time-invariant covariates. They have to manage attrition that correlates with outcome (people who fail the program are more likely to skip follow-up), which makes complete-case analysis particularly bad in this field.

Common method by questionDid the average participant gain: paired t-test (still common, often wrong). Did the program produce gain beyond time alone: mixed-effects model with wave x treatment interaction. Did individuals gain at different rates and what predicted it: mixed-effects model with random slope and predictors of slope. Was the program more effective for some sub-groups: same model with treatment by covariate interactions.

A specific shape

A workforce-training cohort of 320 participants tracked across 24 months produces a paired t-test gain of about 18 points and a mixed-effects program effect of about 3 points per wave above secular trend. The two analyses tell different parts of the same story, and the second answers what the first cannot.

02

Health and clinical research

Cohort epidemiology, randomized trials with follow-up, observational studies of disease progression. Unit: patient.

Analytical conventionsBiostatistics has the deepest tradition in longitudinal methods: PROC MIXED in SAS dates to the early 1990s, mixed-model frameworks were textbook standards by 2000, and the publication conventions enforce reporting of fixed effects, random effects, and goodness-of-fit. Studies are often randomized, which simplifies the causal interpretation. Outcome types vary: continuous biomarkers run through linear mixed-effects, binary outcomes (event yes-no) through GEE or generalized linear mixed models, event-time outcomes through Cox proportional hazards.

Where decisions get made differentlyClinical analysts have to handle censoring (the patient is alive at the end of the study; we do not know when the event will eventually happen). They face high stakes around missing data because regulatory submissions are skeptical of imputation. They run sensitivity analyses under multiple missing-data assumptions because reviewers will ask. They pre-specify the analysis in a statistical analysis plan before the data is unblinded, which constrains downstream method choices but improves credibility.

Common method by questionDid the treatment work in the trial: mixed-effects model with treatment x time interaction (continuous outcome) or GEE / GLMM (binary outcome). Did the disease progress faster in some patients: random-slope mixed-effects with predictors of slope. When did the event occur: Cox proportional hazards with time-varying covariates. Did the treatment delay the event: Cox with treatment as a covariate.

A specific shape

A randomized trial with 800 patients followed for 18 months on a depression-symptom scale typically reports a mixed-effects estimate of treatment x time interaction, plus a Cox-model estimate of time to relapse, plus sensitivity analyses under three missing-data assumptions. The whole package goes into the statistical analysis plan before the trial unblinds.

03

Behavioral and social science research

Education research, developmental psychology, sociology panel surveys, economic mobility studies. Unit: student, household, individual.

Analytical conventionsEducation and developmental psychology research uses growth curve modeling as the dominant framework, often fit through structural equation modeling software (Mplus, lavaan) rather than mixed-effects software. Sociology panel data analysis (PSID, NLSY, HRS, ELSA) tends to use fixed-effects regression and difference-in-differences designs more than mixed-effects models. Sample sizes are larger (thousands to tens of thousands), follow-up windows longer (decades), and the outcome variables more heterogeneous than in either program evaluation or clinical research.

Where decisions get made differentlyBehavioral and social science analysts have to handle hierarchical structures (students nested in classrooms nested in schools, individuals nested in households). They face questions about latent constructs (the outcome is psychological well-being, measured through a multi-item scale) and have to decide whether to model the items or a sum-score. They use latent class growth analysis or group-based trajectory modeling when they expect distinct sub-populations follow different trajectories. They also work with data that is publicly archived from large national studies, so the analytical decisions are made in conversation with what previous researchers have done with the same data.

Common method by questionDid academic achievement grow over the school year: linear growth curve. Did students differ in growth rate: growth curve with random slope. Did some students follow distinctly different trajectories: latent class growth analysis. Did neighborhood income predict adult outcomes: fixed-effects panel regression with individual and time fixed effects.

A specific shape

An education research study tracking 2,400 students across kindergarten through fifth grade typically uses a multilevel growth curve with students nested in classrooms nested in schools. The model produces a population-average growth rate, three levels of variance, and student-level predictors of slope all in one fit.

A note on tools

Statistical software handles the math. The data has to be clean first.

R (lme4, nlme) Python (statsmodels) SPSS SAS Stata Sopact Sense

The five statistical packages above all fit mixed-effects models, GEE, growth curves, and survival models. Once a longitudinal dataset is in long format with a stable unit identifier, every wave correctly attributed, and missing data flagged rather than dropped, the choice between R, Python, SPSS, SAS, and Stata is mostly preference. The methods produce equivalent results. The harder problem in applied work is not the software. It is the data preparation. Most longitudinal analyses fail at the structural step rather than at the modeling step: the unit ID is missing, the wave timestamps are wrong, half the participants did not match across waves, or the wide-format export was not reshaped to long.

Sopact Sense is not a statistical package. It does not fit mixed-effects models or run GEE. What it does is the upstream work: storing longitudinal data in a relational form so that one record per participant grows across waves, exporting either wide or long format on demand, and keeping the structural choices (tracking IDs, append-only storage, schema versioning) clean from the first wave onward. The output is a dataset that drops directly into R, Python, SPSS, SAS, or Stata without the data-preparation pipeline that usually consumes most of an analyst's time on a longitudinal project.

Frequently asked questions

Fifteen questions on the methods

Definitional questions, method-specific questions, software questions, and the question about whether a paired t-test is good enough (it usually is not). Each answer is short and self-contained.

  • Q.01

    What is longitudinal data analysis?

    Longitudinal data analysis is the set of statistical methods used to analyze data collected from the same units across multiple time points. The defining feature is that each unit contributes multiple correlated observations rather than one independent observation. Methods that assume independence (paired t-tests, regular regression on stacked rows) produce wrong standard errors when applied to longitudinal data. Longitudinal analysis methods (mixed-effects models, generalized estimating equations, growth curve models) explicitly account for the within-unit correlation that comes from measuring the same person more than once.

  • Q.02

    What is longitudinal analysis?

    Longitudinal analysis is the broader term covering both the data structure (longitudinal data) and the methods that work with it. Some writers use it to mean the methods specifically; others use it for the whole research-design-plus-analysis package. In practice, longitudinal analysis refers to the analytical work of producing within-unit change estimates from longitudinal data: how much did each unit change, did units change at different rates, and what predicted the differences.

  • Q.03

    What are the main longitudinal data analysis methods?

    The most common methods are: mixed-effects models (also called multilevel or hierarchical linear models), which model both population-level effects and individual deviations; growth curve models, a specialization of mixed-effects models for trajectory questions; generalized estimating equations (GEE), which estimate population-average effects with adjusted standard errors; and survival analysis methods like Cox proportional hazards for event-time outcomes. Mixed-effects models are the most flexible and most widely used. The choice between them depends on whether the research question is about individual trajectories or population averages, and on the type of outcome being measured.

  • Q.04

    What is a mixed-effects model?

    A mixed-effects model is a statistical model that includes both fixed effects (parameters that apply to all units) and random effects (unit-specific deviations). For longitudinal data, the typical setup is a fixed effect for time (the population-average change) plus a random intercept (each unit starts at its own level) and often a random slope (each unit changes at its own rate). The model estimates the population-average trajectory and the variance of individual deviations from it in one step. Mixed-effects models are implemented in R (lme4, nlme), Python (statsmodels), Stata (mixed), and SAS (PROC MIXED).

  • Q.05

    What is a growth curve model?

    A growth curve model is a mixed-effects model where the fixed and random effects are explicitly parameterized as a function of time. The simplest version is a linear growth curve: the model estimates an average starting level (intercept), an average rate of change (slope), and the variance of each across units. More complex versions allow quadratic curves, piecewise curves, or non-linear functional forms. Growth curve models are the standard method when the research question is about how units change over time, especially when the change is expected to follow a recognizable trajectory shape.

  • Q.06

    What are generalized estimating equations (GEE)?

    Generalized estimating equations is a method for analyzing longitudinal data that focuses on population-average effects. Instead of modeling individual variation through random effects, GEE specifies a working correlation structure (independence, exchangeable, AR-1, or unstructured) for observations within the same unit and estimates population-level parameters with corrected standard errors. GEE is most useful when the research question is about population averages rather than individual variation, and when the outcome is binary or count data where mixed-effects models can be computationally harder. R's geepack and Stata's xtgee implement GEE.

  • Q.07

    How do you analyze longitudinal data?

    The high-level workflow is: confirm the data is in long format, with one row per unit per wave; choose the method that matches the research question (mixed-effects for individual variation, GEE for population averages, growth curves for trajectories); decide how to handle missing data (full information maximum likelihood is the default with mixed-effects models, multiple imputation if data is not missing at random); fit the model with appropriate fixed and random effects; check assumptions (normality of residuals, normality of random effects, linearity); and report population-level estimates plus the variance of individual deviations. The work that takes the most time is rarely the model fitting; it is the data preparation and the missing-data handling.

  • Q.08

    What is longitudinal trend analysis?

    Longitudinal trend analysis is the analysis of how a measurement changes across time within the same units. It is a specific application of longitudinal data analysis where the research question is about direction and rate of change rather than about predicting an outcome. Linear or polynomial growth curve models are the typical method. Trend analysis can be done at the individual level (each unit gets its own trend) or at the population level (the average trend across units), and longitudinal models can produce both in the same fit.

  • Q.09

    How is longitudinal study data analyzed?

    Longitudinal study data is analyzed with the same methods as any longitudinal dataset: mixed-effects models, growth curves, GEE, and survival analysis when the outcome is event-time. The distinguishing feature of academic longitudinal study data is usually scale (decades of follow-up, thousands of waves) and complexity (multiple measurement levels, multilevel sampling). The methods are the same as in applied program evaluation; the implementation handles the larger structure. Most academic longitudinal studies publish their analytical code, which is a reliable starting point for similar analyses on similar data.

  • Q.10

    What is longitudinal trajectory analysis?

    Trajectory analysis is the term used when the research question is specifically about the shape of change over time. It overlaps heavily with growth curve modeling. Some methods (latent class growth analysis, group-based trajectory modeling) extend the basic growth curve framework to identify distinct sub-populations that follow different trajectories within the same dataset. Trajectory analysis is common in education research, developmental psychology, and clinical research where investigators expect that not everyone changes the same way.

  • Q.11

    What software is used for longitudinal data analysis?

    R is the most flexible option, with mature packages for mixed-effects models (lme4, nlme), GEE (geepack), and growth curve modeling (lavaan). Python's statsmodels package handles the basics. Stata is popular in economics and public health (xtmixed, xtgee). SAS dominates in biostatistics (PROC MIXED, PROC GENMOD). For applied teams without an in-house statistician, the harder problem is rarely the software; it is getting the data into long format with a clean unit identifier so any of these tools can run. Once the data is structurally clean, all four tools produce equivalent results.

  • Q.12

    Does longitudinal data analysis require long format?

    Most longitudinal analysis methods require long format input: one row per unit per wave, with columns for unit ID, time, and the measurement values. Mixed-effects models, GEE, and growth curve models all expect long format. Some specialized methods (latent growth curve modeling fit through structural equation modeling) can accept wide format, but this is the exception. The first step in most longitudinal analysis pipelines is reshaping wide-format collected data into long format. The reshape is straightforward in any analytical language but should happen once at data preparation rather than every time a new wave arrives.

  • Q.13

    How do you handle missing data in longitudinal analysis?

    Mixed-effects models handle missing data through full information maximum likelihood (FIML) by default, which produces unbiased estimates when data is missing at random (MAR) given the variables in the model. Multiple imputation is the alternative and is necessary when missingness depends on unobserved factors. Complete-case analysis (dropping anyone who missed any wave) is the wrong default in almost every longitudinal study; it discards information and biases estimates whenever missingness is not completely random. The best defense is design: keep follow-up effort high so missingness stays low and the assumptions become defensible.

  • Q.14

    Is a paired t-test enough for longitudinal data?

    A paired t-test answers one question correctly: did the average change from time 1 to time 2 differ from zero across all units. It cannot use data from waves 3 onwards. It does not estimate individual change rates. It produces no information about who changed faster or slower. It also cannot handle covariates, dropouts, or unbalanced waves. The paired t-test is the right method only when there are exactly two waves, no covariates, no missing data, and the question is about average change. In most applied longitudinal projects, none of those conditions hold, and a mixed-effects model is the right method.

  • Q.15

    What is the difference between longitudinal data and longitudinal data analysis?

    Longitudinal data is the dataset itself: same units, multiple time points, connected by a tracking ID. Longitudinal data analysis is the set of statistical methods that operate on that dataset to produce conclusions about within-unit change. The two terms are often used together because the methods are designed for the structure: mixed-effects models, growth curves, and GEE all assume the data is longitudinal in form. For the deeper coverage of the data structure itself, see the longitudinal data sibling page.

More from this cluster

Where to go next

The methods on this page operate on data with a specific structure, collected in a specific way, as part of a study with specific design choices. Each linked page covers one of those upstream layers.

Talk it through

Bring your analysis question. See which method fits.

A short call to talk through what your data looks like, what the funder or reviewer is asking, and which of the methods on this page actually answers the question. Method choice is rarely the hardest decision; getting clear on the question is.