← Methods repository
CONCEPTINTERMEDIATEPYTHON · R · SASlast reviewed 2026-10-31 · updated 2026-11-01 · 1 citation

Randomized Crossover and N-of-1 Trials

Within-person randomized treatment comparisons across periods, including prospectively planned multiple-crossover trials for one individual, with explicit period, sequence, carryover, and washout assumptions.

Study Designstudy-designoperational-specificationsynthetic-worked-example
On this page
Methods reference only. Use primary source citations and local policy before applying this in a study protocol, regulatory submission, payer dossier, or clinical decision.
In plain language

Within-person randomized treatment comparisons across periods, including prospectively planned multiple-crossover trials for one individual, with explicit period, sequence, carryover, and washout assumptions. Use when the condition and treatment effects can be assessed repeatedly and effects are sufficiently reversible over credible study periods.

When to use it
—Compared with a parallel trial, within-person comparison can control stable personal characteristics but may be vulnerable to period effects and carryover.
Watch out for
—Avoid when treatments cure the condition, produce irreversible or long-lived effects, or when rapid disease progression makes periods incomparable.

Definition and scope

Within-person randomized treatment comparisons across periods, including prospectively planned multiple-crossover trials for one individual, with explicit period, sequence, carryover, and washout assumptions. The target population, use, and analysis remain protocol decisions; this card explains the choices and their consequences rather than approving a study.

Operational specification

Specify the stable condition, treatment onset and reversibility, randomized sequences, period length, washout, outcome timing, adherence, intercurrent events, and within-person target contrast. A randomized crossover trial is distinct from a case-crossover observational design; an N-of-1 trial is not merely a case report of sequential prescribing.

Analysis and diagnostics

Use an analysis matched to period and within-person correlation, check time trends and plausible carryover, and document missing periods and treatment discontinuation. An individual estimate concerns that person under the studied conditions; combining N-of-1 trials requires a specified population and hierarchical or other justified synthesis model.

When NOT to use and common errors

Avoid when treatments cure the condition, produce irreversible or long-lived effects, or when rapid disease progression makes periods incomparable. Do not claim absence of carryover from a low-power test or treat repeated observations as independent participants.

Worked example and implementation boundary

In a synthetic paired teaching summary, the same participant has average symptom score 6 during A periods and 4 during B periods, on a scale where lower is better. Calculate B minus A; this does not account for period trends or carryover. The within-person descriptive difference is -2 score units. Randomization-aware analysis and assumptions are still required. The code performs that explicitly stated calculation with synthetic inputs. It is not a complete fitted analysis and does not demonstrate the identification assumptions, estimate sampling uncertainty, or certify application in another population.

Data-source and reporting requirements

Preserve the provenance, dates, units, and observation rule for each input. Claims capture services and transactions under observable benefits; absence of a record is not proof that an event or resource use did not occur. EHR and registry measurements depend on the collection process and may miss care outside the system. Linked sources add reconciliation and selection questions. Primary collection can improve a missing domain but still requires valid measurement and follow-up. Report which of these limitations affects the stated use, which evidence supports the chosen inputs, and what remains uncertain.

Worked example

Scenario

In a synthetic paired teaching summary, the same participant has average symptom score 6 during A periods and 4 during B periods, on a scale where lower is better. Calculate B minus A; this does not account for period trends or carryover.

Dataset

Synthetic inputs with units defined in the scenario; no patient data.

inputvalue
mean_a6
mean_b4

Steps

1Use an analysis matched to period and within-person correlation, check time trends and plausible carryover, and document missing periods and treatment discontinuation. An individual estimate concerns that person under the studied conditions; combining N-of-1 trials requires a specified population and hierarchical or other justified synthesis model.
2Evaluate mean_b-mean_a using the stated synthetic inputs.

Result

The within-person descriptive difference is -2 score units. Randomization-aware analysis and assumptions are still required.

Trade-offs

vs. The alternative described in the method comparison
Pros of this
—Use when the condition and treatment effects can be assessed repeatedly and effects are sufficiently reversible over credible study periods.

Code example

Executed example · Python 3.11.15 · 2026-11-01T02:04:28+00:00

Self-contained synthetic calculation for the worked example only. Inputs and units are listed in the dataset; output is the displayed scalar. This does not fit the full study/model, estimate uncertainty, or select an analysis for a real study.

mean_a = 6
mean_b = 4
result = mean_b-mean_a
assert abs(result - -2) < 1e-9
print(result)

Citations

FOUNDATIONAL / METHODS
  1. [1]Vohra S, et al. CONSORT extension for reporting N-of-1 trials (CENT) 2015 Statement. BMJ. 2015.