Crossover RCT Design

Clinical Biostatistics
crossover
washout
carryover
Within-subject comparison across treatment periods with washout
Published

April 17, 2026

Introduction

In a crossover RCT each participant receives both treatments in sequence, allowing within-subject comparison that greatly increases power relative to a parallel-group design. The design requires washout periods, an assumption of no carryover, and targets chronic, stable conditions where treatment effects are reversible.

Prerequisites

Parallel-group RCTs; within-subject comparisons; mixed-effects models.

Theory

Standard 2x2 crossover: participants are randomised to sequence AB or BA. Within-subject treatment contrast is computed; Grizzle’s test or a mixed-effects model accounts for period, sequence, and carryover effects.

Carryover: residual effect of the first treatment in the second period. Detected by sequence-by-period interaction but under-powered; best avoided by adequate washout.

Assumptions

No carryover effect; condition is stable between periods; treatment effects do not depend on period; washout eliminates pharmacological residue.

R Implementation

library(nlme)

set.seed(2026)
n <- 20
# Two-period, two-treatment crossover
sequence <- sample(c("AB", "BA"), n, replace = TRUE)
subj_eff <- rnorm(n, 0, 1)           # subject random intercept

# True effect: B is 0.5 units higher than A
y_A <- subj_eff + rnorm(n, 0, 0.5)
y_B <- subj_eff + 0.5 + rnorm(n, 0, 0.5)

df <- data.frame(
  subject  = rep(1:n, each = 2),
  period   = rep(1:2, n),
  treatment = unlist(lapply(sequence, function(s) strsplit(s, "")[[1]])),
  sequence = rep(sequence, each = 2),
  y        = unlist(lapply(1:n, function(i)
    if (sequence[i] == "AB") c(y_A[i], y_B[i]) else c(y_B[i], y_A[i])))
)

# Linear mixed-effects model with subject random intercept
fit <- lme(y ~ treatment + period, random = ~ 1 | subject, data = df)
summary(fit)$tTable

Output & Results

Treatment effect estimate with within-subject SE; period effect adjusts for drift; random intercepts absorb between-subject variation.

Interpretation

“The mixed-effects analysis estimated B - A = 0.48 (95 % CI 0.22-0.74, p = 0.002); within-subject comparison gave > 3x the precision of the equivalent parallel-group design.”

Practical Tips

  • Test carryover formally but rely on design: adequate washout (> 5 half-lives) is the primary defence.
  • Unbalanced sequences (AB vs BA counts) weaken inference; aim for balance.
  • More than 2 periods improve power and allow multiple treatments but multiply complexity.
  • If the condition evolves (e.g., progressive disease), crossover is inappropriate.
  • Report per CONSORT extension for crossover trials.