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.
Free sandbox · No credit card · 21 CFR Part 11 compliant
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
In short
Explained
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.
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
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.
| Analysis | Participants used at week 12 | Arm A change | Arm B change | Difference (95% CI) |
|---|---|---|---|---|
| Completers only | A 82, B 76 | -14.1 | -10.2 | -3.9 (-6.7 to -1.1) |
| LOCF | A 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
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.
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.
| Assessment | Screening | Baseline (Day 1) | Week 2 | Week 4 | Week 8 | Week 12 |
|---|---|---|---|---|---|---|
| Symptom score (primary) | ||||||
| Analysis window (days) | -7 to 1 | 8-21 | 22-42 | 43-70 | 71-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.
Compared
| Method | Missing data assumption | When it fits |
|---|---|---|
| MMRM | MAR | Continuous outcome, fixed visit schedule, primary analysis for hypothetical or MAR-based estimands |
| ANCOVA at the target visit with multiple imputation | MAR (or other, depending on the imputation model) | When a treatment-policy estimand uses post-discontinuation data or reference-based imputation |
| LOCF / BOCF single imputation | Values would not have changed after dropout | Rarely justified as primary; NRC 2010 and EMA advise against unjustified single imputation |
| Random-slope (random coefficients) model | MAR | Outcome changes roughly linearly over time; slope is the estimand |
| GEE or generalised linear mixed models | MCAR for standard GEE; MAR for likelihood-based GLMM | Binary or count outcomes measured repeatedly |
Set up visit windows, visit-not-done reasons and end-of-treatment tracking in the free sandbox. No credit card, no time limit.
In Capture
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.
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
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.
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.
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.
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.
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.
Not directly. MMRM is for continuous outcomes. Repeated binary outcomes use methods such as generalised estimating equations or generalised linear mixed models.
Keep exploring
Missing data in clinical trials
MAR and the sensitivity analyses around it.
Estimand (ICH E9(R1))
Which effect the MMRM estimates.
Repeated measures sample size calculator
Plan for correlated visits.
Baseline visit
The anchor for change from baseline.
Repeating forms and longitudinal events
Collecting visit-level data.
Statistical analysis plan
Where the model is pre-specified.
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.