Understanding covariance in MMRM

๐Ÿ”‘ 1. Within-Subject Covariance (Repeated Measures Covariance)

This is the main type of covariance modeled in MMRM.

➤ What it is:

  • The correlation of repeated measurements within the same subject over time.

  • It captures how a subject’s outcome at Week 12, Week 24, Week 48, etc., are related to each other.

➤ How it’s handled:

  • This is modeled using the REPEATED statement in SAS (or nlme::lme in R).

  • You specify a covariance structure, such as:

Covariance StructureDescription
UN (Unstructured)Every timepoint has its own variance; all pairwise covariances are estimated. Very flexible but high parameter count.
CS (Compound Symmetry)Constant variance and constant correlation between any two visits.
AR(1)Correlation declines as timepoints are further apart (auto-regressive).
TOEP (Toeplitz)Fixed correlation pattern depending on lag between visits.
VC (Variance Components)No correlation, but separate variances per visit.
FA (Factor Analytic)Parsimonious alternative to UN; good for many timepoints.

๐Ÿ”ข Number of parameters for common structures (assuming k timepoints):

Structure# of parameters
UNk(k+1)/2
CS2 (variance + correlation)
AR(1)2 (variance + ฯ)
TOEP(k−1)k variances + (k−1) covariances

๐Ÿ”‘ 2. Between-Subject Covariance

  • Not explicitly modeled in MMRM.

  • Why? Because MMRM assumes that each subject is independent of the others.

  • The focus is entirely on within-subject repeated measures.

However:

  • The random errors across different subjects are assumed independent, unless you’re using random effects models (e.g., linear mixed models with subject-level random intercepts).

MMRM does not include random effects like subject-level intercepts. Instead, it uses a marginal model with a fully specified within-subject covariance.


๐Ÿ” Summary Table

Covariance TypeModeled in MMRM?Example Structures# of Parameters (k=5 visits)
Within-Subject✅ YesUN, CS, AR(1), TOEP, FAVaries (e.g., 15 for UN)
Between-Subject❌ No(Assumed independent)0
Subject-Level Random Effects❌ No in MMRM(Only in LME models)N/A

๐Ÿงช Bonus: What Happens If You Use Random Effects?

If you use PROC MIXED with a RANDOM intercept / subject=ID; statement instead of REPEATED, you’re fitting a linear mixed-effects model (LME), not a marginal MMRM. That has different assumptions:

  • Conditional model (subject-specific)

  • Assumes random intercepts (or slopes)

  • Simpler within-subject residual structure (often i.i.d.)

MMRM, by contrast:

  • Is marginal

  • No subject-specific random effects

  • Models entire within-subject covariance matrix directly


Final Notes

  • Always choose your within-subject covariance structure based on:

    • Number of visits

    • Sample size

    • Missing data pattern

    • Model fit (AIC/BIC/Likelihood Ratio Test)

Comments

Popular posts from this blog

Analysis of Repeated Measures Data using SAS (1)

Understanding Binding vs. Non-Binding Futility Analysis in Clinical Trials

Medical information for Melanoma, Merkel cell carcinoma and tumor mutation burden