Why the Outcome Window Matters
When a participant stops assigned treatment before the planned end of a trial, outcomes after stopping can still be measured. Whether those outcomes belong in the treatment contrast is not just a data-handling decision: it defines the question being answered. A while-on-treatment estimand uses outcomes observed before treatment ends and excludes outcomes after that event from its outcome summary. It therefore targets the experience during treatment, not the effect at a common follow-up time regardless of treatment discontinuation.
This distinction is important when discontinuation is common, differs between treatment conditions, or is related to health status. Participants can contribute outcomes over different lengths of time, so the estimand must say how those unequal observation windows are summarized. Simply comparing the last observed values, or pooling every measurement as if they had equal meaning, can silently answer a different question.
Defining the Time Window and Summary
Let \(a\) index a treatment condition, and let \(Y^a(t)\) denote the outcome that would be measured at time \(t\) under that condition. Let \(D^a\) be the time treatment ends under condition \(a\), and let \(\tau\) be the planned maximum follow-up time. The on-treatment window ends at \(L^a=\min(D^a,\tau)\). If lower outcome values are better, the outcome direction should be stated as part of the clinical interpretation.
One useful summary for a repeatedly measured outcome is the participant's time-average over that window:
The mean for condition \(a\) is \(\mu_a=E(Q^a)\) in the prespecified target population, and a contrast such as \(\Delta=\mu_1-\mu_0\) compares the average participant-level time-average under the two treatment conditions. This definition gives each participant equal weight in the population mean, regardless of how long they remain on treatment. It does not give every observed measurement equal weight.
The restriction \(L^a>0\) matters. If a participant can discontinue before any post-baseline outcome is observed, the time-average above is undefined for that participant. The protocol must therefore specify a valid summary for that case—for example, a prespecified baseline-to-first-assessment summary when that is clinically meaningful, or a different outcome definition. An analyst cannot silently omit such participants and still claim to estimate the mean for all randomized participants.
The stopping time can differ between treatment conditions and can be affected by a participant's evolving outcome. Consequently, \(\mu_a\) describes the mean of participant-level summaries over the treatment windows generated under condition \(a\). It is not the mean outcome among a fixed group of people who would remain on treatment under both conditions, nor is it automatically the effect at any particular common time. Those are different targets.
Calculating a Time-Average From Scheduled Assessments
In practice, measurements are often available at scheduled visits rather than continuously. If measurements at times \(t_0,\ldots,t_m\) span the on-treatment interval, the trapezoidal rule approximates the area under the outcome curve. For adjacent measurements, the area is the interval length multiplied by the average of the two endpoint values. Dividing the total area by the observed on-treatment duration gives the estimated time-average.
This calculation assumes the straight-line interpolation between adjacent measurements is an acceptable approximation for the outcome trajectory over each interval. With irregular visit times, the interval lengths must be included; treating all intervals as one week when they are not would distort the area. The measured window also needs to end at the treatment-discontinuation time or at a clearly specified visit-based approximation to it.
Worked Example: Comparing Mean Time-Average Scores
Consider a hypothetical symptom scale measured in points, where lower scores indicate fewer symptoms. Two participants assigned to condition 1 have assessments at weeks 0, 1, 2, and 3 if still on treatment. Participant A stops at week 3 and has scores 10, 8, 6, and 4. Participant B stops at week 2 and has scores 12, 10, and 8. In condition 0, participant C remains on treatment through week 3, with scores 11, 9, 7, and 5; participant D stops at week 2, with scores 9, 8, and 7. Assume there are no missing scheduled assessments before treatment ends.
For participant A, the three one-week trapezoid areas are \((10+8)/2=9\), \((8+6)/2=7\), and \((6+4)/2=5\) point-weeks. The total area is \(9+7+5=21\) point-weeks, so the time-average is \(21/3=7\) points.
For participant B, the two areas are \((12+10)/2=11\) and \((10+8)/2=9\) point-weeks. The total is \(20\) point-weeks over 2 weeks, giving \(20/2=10\) points. The estimated condition 1 mean is \((7+10)/2=8.5\) points.
For participant C, the areas are \((11+9)/2=10\), \((9+7)/2=8\), and \((7+5)/2=6\), for a total of \(24\) point-weeks. The time-average is \(24/3=8\) points. For participant D, the areas are \((9+8)/2=8.5\) and \((8+7)/2=7.5\), totaling \(16\) point-weeks; the time-average is \(16/2=8\) points. The estimated condition 0 mean is \((8+8)/2=8\) points.
The estimated contrast is \(\Delta=8.5-8.0=0.5\) points. In this hypothetical sample, the mean participant-level time-average symptom score is 0.5 points higher in condition 1. Because lower scores are better, this descriptive contrast favors condition 0 on this summary. It does not establish that condition 0 is superior in the population; uncertainty and the trial's inferential procedure are also needed.
Why This Is Not a Fixed-Follow-Up Effect
A fixed-follow-up estimand asks about an outcome at a common prespecified time \(\tau\), including outcomes after treatment discontinuation if they are collected and included under the chosen intercurrent-event strategy. A while-on-treatment time-average instead summarizes each participant's trajectory only through their own treatment end or the planned trial end. The two summaries can differ even when they use the same outcome scale and target population.
For example, consider one hypothetical participant with scores of 6, 8, and 10 at weeks 0, 1, and 2, who stops treatment after week 2. Suppose a week-3 score of 15 is also collected. The time-average through week 2 is based on areas \((6+8)/2=7\) and \((8+10)/2=9\), so it is \((7+9)/2=8\) points. If the target is instead the time-average through week 3, including the post-discontinuation score, the additional area is \((10+15)/2=12.5\) point-weeks, and the total is \((7+9+12.5)/3=9.5\) points. The fixed-window summary includes information after treatment ends; the while-on-treatment summary does not.
That example illustrates the difference in definition, not a treatment effect: a contrast requires summaries under both treatment conditions in the target population. It also shows why post-discontinuation outcomes should not be included merely because they happen to be available. Doing so changes the outcome window and hence the estimand. Conversely, discarding them is not appropriate if the intended target is a fixed-time outcome regardless of discontinuation.
Unequal Duration, Truncation, and Estimation
Truncation here means that the outcome record used for the while-on-treatment summary ends when treatment ends. This is not the same as ordinary missing data: the estimand intentionally excludes post-discontinuation outcomes. However, an outcome that should be observed before treatment ends but is not recorded is missing data, and requires an appropriate analysis or sensitivity assessment. Treating an unobserved pre-discontinuation value as though it were excluded by definition confuses these two problems.
For a randomized comparison, a direct estimator of each condition mean is the average of the participant-level summaries:
Here \(A_i\) is participant \(i\)'s assigned condition and \(n_a\) is the number assigned to condition \(a\). This estimator gives each participant equal weight. Its interpretation relies on the treatment conditions and outcome summary being well-defined, randomization supporting the comparison in the target population, and the required pre-discontinuation measurements being available or handled using defensible assumptions. Consistency means a participant's observed outcomes under the assigned condition correspond to the outcomes specified for that condition; interference between participants must not undermine the comparison.
Worked Example: Equal Participant Weight Versus Pooled Time
Suppose two hypothetical participants have constant symptom scores while on treatment. Participant E remains on treatment for 1 week with a score of 10 points; participant F remains for 4 weeks with a score of 4 points. Their participant-level time-averages are therefore 10 and 4 points.
The equal-participant mean is \((10+4)/2=7\) points. A different calculation pools outcome-time and divides by total time: \((10\times1+4\times4)/(1+4)=(10+16)/5=5.2\) points. The pooled-time result gives four times as much weight to F as to E because F contributes four times as much treatment time.
Thus the pooled-time calculation is not an alternative way to estimate the same equal-participant mean. It targets a time-weighted average and would need to be explicitly chosen and clinically justified as the summary measure. Longer treatment exposure may be associated with prognosis or tolerability, so changing the weights can materially change the question.
Assumptions, Diagnostics, and Limitations
The summary is meaningful only if its measurement scale and direction are clinically interpretable over the full treatment window. The assessment schedule and the rule for locating treatment end should be specified in advance. If discontinuation can occur between visits, the analysis must state whether the window ends at the recorded stop date, the last assessment before the stop, or another prespecified time. The area calculation also requires a defensible interpolation model; sparse assessments can conceal rapid changes between visits.
Several diagnostics can reveal when the analysis is fragile. Compare the distribution of treatment duration by assigned condition, inspect the timing and reasons for discontinuation, and plot individual or summarized outcome trajectories up to treatment end. Check whether missing assessments occur before discontinuation and whether visit spacing differs across participants. If a condition has many very short exposure periods, its mean time-average may rely on short, noisy trajectories and may be hard to compare clinically with summaries from longer periods. A sensitivity analysis can examine reasonable alternatives for missing pre-discontinuation measurements or interpolation, while keeping clear which parts are assumptions rather than observed data.
A while-on-treatment contrast is not automatically a pure pharmacologic effect. Treatment end can depend on response, adverse effects, or other post-randomization factors; consequently, the people contributing measurements at later times may differ between conditions. The defined contrast remains a comparison of treatment-condition-specific participant summaries, but it should not be interpreted as the effect among people who would stay on treatment under either condition. Establishing such a target would require a different estimand and additional assumptions.
The main alternatives answer different questions. A treatment-policy summary uses outcomes regardless of treatment discontinuation when they are collected, reflecting the consequences of assignment in the presence of discontinuation. A hypothetical summary targets outcomes under a specified scenario in which treatment discontinuation did not occur. A fixed-time outcome uses a common assessment time. None is universally preferable: the choice depends on the clinical question, and the wording of the estimand should make the choice visible.
Common Mistakes
- Using only the last observed score. The last score can occur at different times in different participants. Comparing those values does not generally estimate a common-time effect or a time-average.
- Including post-discontinuation outcomes without changing the definition. Such outcomes may be relevant, but including them changes a while-on-treatment summary into a different target.
- Calling every unobserved value “truncated.” Post-stop outcomes are outside this estimand by definition; missing measurements before treatment ends are missing data.
- Pooling all person-time while claiming equal participant weighting. A pooled-time average gives more influence to participants with longer exposure and targets a different summary.
- Interpreting the contrast as an effect among persistent users. A mean of participant-specific summaries includes each participant's own treatment window; it does not identify a subgroup defined by remaining on treatment under both conditions.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A participant has scores of 8, 6, and 4 at weeks 0, 1, and 2, and stops treatment at week 2. Using linear interpolation, what is the time-average score through treatment end?
- In one sentence, distinguish the outcome window for a while-on-treatment estimand from that for a fixed-week-12 outcome that includes measurements after treatment discontinuation.
- Two participants have time-averages of 3 and 9 points and treatment durations of 2 and 6 weeks. Find the equal-participant mean and the pooled-time average. What is the weighting difference?
- Why is a measurement missed at week 2 while a participant remains on treatment not automatically handled by the while-on-treatment strategy?
Solutions. (1) The areas are \((8+6)/2=7\) and \((6+4)/2=5\) point-weeks. The total is 12 over 2 weeks, so the time-average is \(12/2=6\) points. (2) The while-on-treatment summary ends at each participant's treatment end, whereas the fixed-week-12 outcome uses the common week-12 measurement even when treatment has ended, if that measurement is collected and included. (3) The equal-participant mean is \((3+9)/2=6\) points. The pooled-time average is \((3\times2+9\times6)/(2+6)=60/8=7.5\) points; it gives more weight to the participant treated for 6 weeks. (4) The week-2 measurement is within the defined on-treatment window, so its absence is missing data, not an outcome excluded by the estimand.