Glossary · Outcomes and endpointsUpdated November 30, 2026

What is MMRM? The mixed model for repeated measures explained

MMRM (mixed model for repeated measures) is a regression model for a continuous outcome measured at several scheduled visits. It uses every observed value from every participant, models how visits are correlated within a person, and estimates the treatment difference at a target visit without imputing missing values.

  • MMRM in plain language
  • How it works in practice
  • Related terms

Free sandbox · No credit card · 21 CFR Part 11 compliant

  • ISO 27001 certified
  • 21 CFR Part 11 compliant
  • GDPR compliant
  • EU and US data hosting
  • HIPAA compliant
  • ICH GCP E6(R3) compliant
Outcomes and endpointsMMRM

Mixed model for repeated measures

noun · clinical research

A likelihood-based linear model for longitudinal continuous data with fixed effects for treatment, visit and their interaction, and an (often unstructured) covariance matrix for repeated measurements within a participant. Valid when data are missing at random.

Related terms

Change from baselineMissing at randomLS meanCovariance structureEstimand

In short

  • MMRM is the usual primary analysis for continuous endpoints measured at several visits, such as symptom scores, lung function or HbA1c, analysed as change from baseline.
  • It includes treatment, visit, treatment-by-visit, the baseline value (often baseline-by-visit) and stratification factors, and estimates the treatment difference at the target visit as a least squares (LS) mean difference.
  • It uses all available data without imputation and is valid under missing at random (MAR): dropout may depend on earlier observed values, but not on the unobserved ones.
  • It replaced LOCF as the default because carrying values forward rests on stronger, usually implausible assumptions.
  • Under ICH E9(R1), an MMRM on on-treatment data usually targets a hypothetical estimand. Sensitivity analyses test what happens if MAR is wrong.

Explained

How an MMRM works

Imagine a trial measuring a symptom score at baseline and at weeks 2, 4, 8 and 12. The primary endpoint is the change from baseline at week 12. A simple analysis would compare week 12 values only among people who reached week 12, throwing away everyone who left early and everything measured before. MMRM instead fits all post-baseline values together. Each participant contributes whatever visits they attended.

The model has two parts. The fixed effects describe the average pattern: a separate mean for each arm at each visit (the treatment-by-visit interaction), adjusted for the baseline visit value and stratification factors from randomisation. The covariance structure describes how a person's values at different visits relate: someone above average at week 4 tends to be above average at week 8. Because the model knows that correlation, early values from a participant who dropped out inform the estimate of where they would have been at week 12, under the MAR assumption.

Despite the name, the common regulatory MMRM usually has no random effects at all. It is a marginal model with an unstructured within-participant covariance, fitted by restricted maximum likelihood, with Kenward-Roger or similar degrees of freedom. The "mixed" refers to the general mixed-model software it is fitted with.

Choosing the covariance structure

An unstructured covariance estimates a separate variance for each visit and a separate correlation for each pair of visits, so it makes no assumption about the pattern. It is the usual first choice in confirmatory trials. With many visits or small samples it may fail to converge, so the SAP should name a fallback order in advance, for example Toeplitz, then first-order autoregressive, then compound symmetry, and the rule for moving down it. Choosing the structure after seeing which gives the smallest p-value is a form of analysis flexibility that inflates type I error.

Worked example

Completers, LOCF and MMRM on the same trial: DEMO-310

A demo two-arm trial randomised 100 participants per arm and measured a 0-60 symptom score (higher is worse) at baseline and weeks 2, 4, 8 and 12. More participants left Arm B early, mostly after poor early responses. Illustrative numbers only, not output from a real dataset.

AnalysisParticipants used at week 12Arm A changeArm B changeDifference (95% CI)
Completers onlyA 82, B 76-14.1-10.2-3.9 (-6.7 to -1.1)
LOCFA 100, B 100 (last value carried)-12.6-10.0-2.6 (-5.0 to -0.2)
MMRM (unstructured, baseline-adjusted)All observed visits from all 200-13.4 (LS mean)-9.9 (LS mean)-3.5 (-6.1 to -0.9)

Completers overstate the benefit because the dropouts who were doing badly are gone. LOCF freezes early dropouts at their last value, which is only right if scores would not have changed. MMRM uses each dropout's trajectory up to leaving, under MAR.

Data

What the data need to look like

MMRM is fitted on long-format data: one row per participant per scheduled visit, with the outcome, the baseline value, treatment arm, visit and covariates. Getting from an EDC export to that dataset involves decisions that belong in the SAP, not in the programmer's head.

Decisions to pre-specify

  • Baseline definition: usually the last value before first dose.
  • Analysis windows: how out-of-window or unscheduled assessments map to nominal visits, and which value wins when two fall in one window.
  • Post-discontinuation data: whether values collected after stopping treatment are included (treatment-policy) or excluded (hypothetical); see estimand (ICH E9(R1)).
  • Covariates: baseline value, baseline-by-visit, stratification factors; no post-randomisation covariates.
  • Sensitivity analyses for departures from MAR; see missing data in clinical trials.

Planning the sample size

An MMRM gains some precision from correlated earlier visits and from baseline adjustment, but the target-visit comparison still drives power. Plan for expected dropout and correlation with the repeated measures sample size calculator and the dropout-adjusted sample size calculator.

DEMO-310 assessment schedule · symptom score and analysis windows
AssessmentScreeningBaseline (Day 1)Week 2Week 4Week 8Week 12
Symptom score (primary)
Analysis window (days)-7 to 18-2122-4243-7071-98
Visit occurred? / reason not done
End of treatment / withdrawal status

x = collected at this visit. Windows map unscheduled or off-schedule assessments to nominal visits.

Demo schedule. Define windows and the rule for two values in one window in the SAP.

Compared

MMRM and the alternatives

MethodMissing data assumptionWhen it fits
MMRMMARContinuous outcome, fixed visit schedule, primary analysis for hypothetical or MAR-based estimands
ANCOVA at the target visit with multiple imputationMAR (or other, depending on the imputation model)When a treatment-policy estimand uses post-discontinuation data or reference-based imputation
LOCF / BOCF single imputationValues would not have changed after dropoutRarely justified as primary; NRC 2010 and EMA advise against unjustified single imputation
Random-slope (random coefficients) modelMAROutcome changes roughly linearly over time; slope is the estimand
GEE or generalised linear mixed modelsMCAR for standard GEE; MAR for likelihood-based GLMMBinary or count outcomes measured repeatedly

Give your MMRM clean visit data

Set up visit windows, visit-not-done reasons and end-of-treatment tracking in the free sandbox. No credit card, no time limit.

Try Capture free

In Capture

Visit-level data built for longitudinal analysis

An MMRM depends on knowing which visit each value belongs to, whether a missing visit happened at all, and whether the participant was still on treatment. In Capture, each visit has a completion window with soft, hard, warning-only or auto-close enforcement, and study managers can switch on an automatic query for out-of-window entries. The first form of each visit records Did this visit occur?, with a Reason visit not done such as missed visit, subject withdrew or lost to follow-up. End of Treatment is recorded separately from withdrawal, so follow-up visits continue after study drug stops. Data review has a comparison grid that shows each parameter across visits, with a baseline that defaults to the last value before first dose. Exports give raw data with visit identifiers and a data dictionary, or SDTM datasets.

  • Visit windows with enforcement modes and out-of-window queries.
  • Visit-not-done reasons and end of treatment recorded as data.
  • Values compared across visits against a defined baseline.
Help: set visit windows
Day 25Target: day 28Day 31

Window -3 / +3 days around the anchored target date

Soft window

Stays available with a protocol deviation flag

Hard window

Locks outside the window

Warning only

Stays available with a warning

Auto-close

Marked missed when the window closes

FAQ

Common questions

Something not covered here? Ask us directly.

What does MMRM stand for?

Mixed model for repeated measures, sometimes written mixed-effects model for repeated measures. It is a regression model for continuous outcomes measured at several visits.

Why is MMRM preferred over LOCF?

LOCF assumes a participant's outcome would have stayed at its last observed value, which is rarely plausible and can bias results in either direction. MMRM uses all observed data and assumes only that missingness is at random given the observed data.

What covariance structure should an MMRM use?

Unstructured is the usual first choice in confirmatory trials because it makes no assumption about the pattern. The SAP should pre-specify fallback structures in case it does not converge.

Does MMRM impute missing data?

No. It fits the model to all observed values and the likelihood accounts for missing visits implicitly. The estimate is equivalent to what you would get under a MAR assumption.

What estimand does MMRM target?

Fitted on on-treatment data, it usually targets a hypothetical estimand: the effect if participants had stayed on treatment. Other estimands, such as treatment policy, usually need different data or methods.

Can MMRM be used for binary outcomes?

Not directly. MMRM is for continuous outcomes. Repeated binary outcomes use methods such as generalised estimating equations or generalised linear mixed models.

Collect longitudinal data that fits the model

Build your visit schedule, windows and forms in the free sandbox and export dummy data to test your MMRM code. No credit card, no time limit.

Try Capture free