When the treatment journey changes.
Does Care A improve symptoms more than Care B? Patients may start rescue care or stop their assigned care. Higher improvement scores are better; negative scores mean worsening.
2. Choose the question
3. See whose outcome counts
Select a patient to follow ↓Follow one patient
The replay changes the view only. All analysis results use the complete 12-week trial.
Where did the week-12 difference go?
In this toy model, each event changes the final score by the same number of points. That makes the treatment-policy contrast easy to unpack.
Same trial. Different questions.
Select a row to exploreCompare the question, population and units as well as the number. These rows are not competing corrections of one result.
| Strategy | What is summarized? | A | B | A − B |
|---|
Follow the arithmetic, step by stepAnalysis values → numerator → denominator → group difference
1. Give this patient an analysis value
Switching strategies does not edit the recorded data. It changes which outcome enters the calculation, which time is used, or which population is targeted.
| Strategy | Value for | Reason |
|---|
2. Add the analysis values, then divide
Everyone included has weight 1. Excluded patients add neither a value nor a person to the denominator. A composite failure still adds one person to the denominator.
3. Subtract the two group summaries
Calculations use full precision; displayed sums and means are rounded. These are teaching contrasts, without confidence intervals or significance tests.
Inspect the patient rows behind the total
| Patient | Event | Recorded week 12 | Analysis value | In denominator? |
|---|
Go deeper: definitions, assumptions and the five strategies
Event ≠ missing measurement
Rescue care changes how an outcome is interpreted. A missed assessment leaves a measurement unavailable. Stopping treatment can happen with continued follow-up, as it does here.
Choose the question first
An estimand specifies the people, care conditions, outcome, event strategy and population summary. It is the target; the statistical estimator is how we try to learn about it.
Five ways to specify that target
- Treatment policy: use the outcome whether the event occurs or not.
- Hypothetical: ask about a defined alternative world. Here, rescue is unavailable or assigned care continues throughout.
- Composite: build the event into the endpoint. Here, success requires both a score threshold and no event.
- While on treatment: use outcomes before the event. Here, use the last weekly score before the event, or week 12.
- Principal stratum: target a subgroup defined by potential event status under the care conditions. Here, patients who would have no event under either A or B.
Different events can require different strategies in one trial. This playground considers one event type at a time so each calculation stays inspectable.
What the simulator can reveal that a trial cannot
The dashed no-event path and event status under unassigned care come from the fictional generator. Neither is normally observable for an individual. The hypothetical and principal-stratum rows use that hidden information for teaching; they are not fitted estimates. Real analyses need appropriate data, justified assumptions and methods.
Why the shortcut is a trap
Removing people because of a post-assignment event may select different prognoses in the two groups. It does not, by itself, estimate the result if events had been prevented. It also does not identify the people who would avoid events under both care conditions.
And what about death?
There are no deaths in this simulation. A symptom score after death does not exist. Treating it as an ordinary uncollected score and applying the same treatment-policy calculation would be inappropriate.
The exact fictional model
120 patients are assigned to two groups of 60 using a fixed shuffled sequence. Prognosis z ranges from 0 to 1; larger values predict greater improvement. Week-12 improvement without the event is 10 + 20z + noise for B, and 8 + 4(1 − z) points greater for A. Noise ranges from −5 to +5. Scores grow linearly from baseline improvement 0.
Event probability = logistic(logit(slider proportion) + 5 × linkage × (0.5 − z)), with linkage on a 0–1 scale. Slider values 0% and 100% guarantee no events and all events, respectively. Each patient has fixed, separate random draws for their potential event under A and under B. An event occurs at week 4, 7 or 10, just before that week's assessment.
The event's effect grows linearly from 0 at its occurrence to the selected gain or loss at week 12. We assume the same final event effect for every affected patient, no additional events, no deaths and complete weekly follow-up. Earlier events therefore spread this same final effect over more weeks. These are teaching choices, not clinical assumptions to reuse.
For while-on-treatment, the last eligible measurement is at week 3, 6 or 9 for event patients. Everyone contributes one value, regardless of how early their event occurred. For the principal stratum, we reveal patients with no event under either condition and compare their assigned-care outcomes; finite group differences remain. No strategy result here is a population truth inferred without uncertainty.
Method references: ICH E9(R1), sections A.3.1–A.3.3 and ICH training materials, module 2.3. The scenario, data and calculations in this playground are invented for learning.