Tutorials › Response-Adaptive Randomization › Worked Example: Worsening Prognosis During Adaptive Enrollment

Time Trends and Drift · Tutorial 413 of 501

Worked Example: Worsening Prognosis During Adaptive Enrollment

Learn to calculate crude and time-adjusted treatment contrasts when prognosis worsens over enrollment and adaptive allocation increasingly favors one treatment.

Advanced 9 min read

What You'll Learn

  • Calculate crude treatment means and their difference from changing arm sizes across time.
  • Standardize treatment means to a prespecified common distribution of enrollment time.
  • Interpret how a crude contrast can differ in sign from within-time contrasts.
  • Distinguish a common treatment effect from a target-weighted contrast when effects vary over time.
  • Check temporal overlap and state the assumptions needed for time-adjusted interpretation.

Why a Worked Calculation Matters

When prognosis worsens during enrollment, later participants may have systematically different outcomes from earlier participants, regardless of treatment. If an adaptive algorithm also changes the allocation probabilities over that same period, the two treatment arms can contain different proportions of early and late enrollees. The crude difference between arm averages then combines treatment contrasts with differences in enrollment time.

The calculations below use a deliberately small, hypothetical trial. The outcome is a score for which higher values indicate worse prognosis. Treatment A becomes more favored as enrollment proceeds, while average outcomes worsen in both arms. The example illustrates a realized imbalance; it does not imply that adaptive randomization necessarily creates bias in expectation.

Setup and Assumptions

Definition: Let \(Y\) be the outcome, \(A\) indicate assignment to treatment A rather than treatment B, and \(k\) index prespecified enrollment-time blocks. Let \(n_{ak}\) and \(\bar{Y}_{ak}\) be the number of participants and the observed mean outcome assigned to arm \(a\) in block \(k\). The crude contrast is the arm A mean minus the arm B mean, using each arm’s own time distribution. A time-standardized contrast uses the same prespecified block weights \(w_k\) for both arms, where \(w_k\geq 0\) and \(\sum_k w_k=1\).

For the basic calculation, outcomes must be measured on the same scale in both arms, treatment assignment must correspond to the treatment actually analyzed, and enrollment time must be recorded consistently. To interpret a time-adjusted contrast causally, randomization must make treatment assignment independent of potential outcomes conditional on the information used by the assignment mechanism, including relevant time or trial history. Each treatment must also have a positive probability of assignment in the time blocks receiving positive weight; otherwise the corresponding within-block contrast is not estimable from the trial.

A simple time-block adjustment additionally assumes that the blocks adequately capture the relevant prognostic change for the intended comparison. If the treatment effect differs across time, the standardized contrast remains interpretable as a weighted average of block-specific contrasts, but it is not a single common effect. Missing outcomes, changes in outcome measurement, or important changes within blocks can require further modeling and sensitivity analysis.

Crude and Standardized Contrasts

The crude mean in arm \(a\) is a weighted average of its block-specific means, with weights given by that arm’s observed enrollment distribution:

$$ \bar{Y}_a^{\mathrm{crude}}=\sum_k \frac{n_{ak}}{n_a}\bar{Y}_{ak}, \qquad \Delta_{\mathrm{crude}}=\bar{Y}_A^{\mathrm{crude}}-\bar{Y}_B^{\mathrm{crude}}, \qquad n_a=\sum_k n_{ak}. $$

For time standardization, choose a target distribution \(w_k\) and apply it to both arms:

$$ \bar{Y}_a^{\mathrm{std}}=\sum_k w_k\bar{Y}_{ak}, \qquad \Delta_{\mathrm{std}}=\sum_k w_k(\bar{Y}_{Ak}-\bar{Y}_{Bk}). $$

A common choice is the trial’s pooled enrollment distribution, \(w_k=(n_{Ak}+n_{Bk})/N\), where \(N\) is the total number enrolled. This describes a contrast standardized to the trial’s overall mix of enrollment times. Other target weights answer different questions and should be chosen for a substantive reason, not because they produce a preferred result.

Worked Example: A Crude Contrast Reverses the Within-Time Pattern

Suppose a hypothetical trial records the following counts and mean scores in three prespecified enrollment blocks. The allocation share for A rises across blocks, and scores worsen over time in both arms.

Enrollment blockA countA mean scoreB countB mean scoreShare assigned A
Early15461/5 = 20.0%
Middle481194/15 = 26.7%
Late5116125/11 = 45.5%

Crude arm means. Arm A has \(1+4+5=10\) participants. Its total score is \(1(5)+4(8)+5(11)=5+32+55=92\), so \(\bar{Y}_A^{\mathrm{crude}}=92/10=9.200\). Arm B has \(4+11+6=21\) participants. Its total is \(4(6)+11(9)+6(12)=24+99+72=195\), so \(\bar{Y}_B^{\mathrm{crude}}=195/21=9.286\), rounded to three decimal places.

The crude contrast is \(9.200-9.286=-0.086\) score points (using the unrounded arm means, \(-0.0857\), which rounds to \(-0.086\)). Since higher scores are worse, this crude comparison slightly favors A. But the block-specific contrasts are \(5-6=-1\), \(8-9=-1\), and \(11-12=-1\) score point: A has a one-point lower mean in every block. The crude result points in the opposite direction because A has a larger share of participants in the later, worse-prognosis blocks.

Pooled-time standardization. There are \(5\), \(15\), and \(11\) participants in the early, middle, and late blocks, respectively, for \(N=31\). Thus the pooled weights are \(5/31\), \(15/31\), and \(11/31\). The standardized means are

$$ \bar{Y}_A^{\mathrm{std}} =\frac{5(5)+15(8)+11(11)}{31} =\frac{266}{31}=8.581, \qquad \bar{Y}_B^{\mathrm{std}} =\frac{5(6)+15(9)+11(12)}{31} =\frac{297}{31}=9.581. $$

Therefore \(\Delta_{\mathrm{std}}=8.581-9.581=-1.000\) score point. This is the treatment contrast standardized to the pooled distribution of enrollment blocks. Here it also equals each block-specific contrast because the three block differences are identical.

Why Standardization Works

The key difference between the calculations is their weighting. The crude contrast uses arm-specific weights \(n_{Ak}/n_A\) and \(n_{Bk}/n_B\); the standardized contrast deliberately uses the same \(w_k\) for each arm. If the block-specific contrast is \(\Delta_k=\bar{Y}_{Ak}-\bar{Y}_{Bk}\), then by definition:

$$ \Delta_{\mathrm{std}}=\sum_k w_k\Delta_k. $$

This identity shows exactly what time standardization does: it combines the within-block contrasts under a common target distribution. For the crude contrast, write each block mean as \(\bar{Y}_{Bk}+\Delta_k\). Substituting into the arm-specific averages gives

$$ \Delta_{\mathrm{crude}} =\sum_k\left(\frac{n_{Ak}}{n_A}-\frac{n_{Bk}}{n_B}\right)\bar{Y}_{Bk} +\sum_k\frac{n_{Ak}}{n_A}\Delta_k. $$

The first term reflects differences in time composition applied to the B-arm block means; the second averages treatment differences using A’s time distribution. When prognosis changes over time and arm distributions differ, the first term need not be zero. That is how a crude contrast can disagree with a common-weight contrast, even if random assignment was used.

In the worked trial, the common treatment difference is \(-1\) in every block, so any valid common set of block weights gives \(-1\). More generally, the weights matter when the block-specific differences vary. A regression model with block indicators and a common treatment coefficient produces a related time-adjusted comparison under its model assumptions. It should not be treated as automatically identical to every standardization: the estimand, weights, and treatment-by-time specification need to be made explicit.

Worked Example: Changing the Target Time Distribution

Use the same hypothetical block means as before, but target an equal mix of early, middle, and late enrollment: \(w_k=1/3\) for every block. This target differs from the observed pooled distribution, which gives more weight to the middle block.

The standardized means are \((5+8+11)/3=24/3=8.000\) for A and \((6+9+12)/3=27/3=9.000\) for B. Thus the equal-block standardized contrast is \(8.000-9.000=-1.000\) score point. It agrees with the pooled-time contrast because the block-specific differences are all \(-1\), not because the two target distributions are the same.

This calculation clarifies the interpretation: the pooled-time contrast refers to the trial’s observed overall distribution of enrollment, whereas the equal-block contrast refers to a hypothetical target giving each period equal weight. If treatment effects vary by time, those two summaries can differ.

Worked Example: When Block-Specific Effects Differ

Now suppose the same counts and B means apply, but A’s hypothetical block means are \(5\), \(8\), and \(12\), rather than \(5\), \(8\), and \(11\). The block-specific differences are then \(-1\), \(-1\), and \(0\) score points. This is an illustrative effect pattern, not evidence about a real trial.

The crude A total is \(1(5)+4(8)+5(12)=5+32+60=97\), giving a crude mean of \(97/10=9.700\). The B mean remains \(195/21=9.286\). Therefore the crude contrast is \(9.700-9.286=0.414\) score points.

Using pooled weights, the standardized contrast is

$$ \Delta_{\mathrm{std}} =\frac{5(-1)+15(-1)+11(0)}{31} =\frac{-20}{31} =-0.6452 \text{ score points}. $$

This is a pooled-time weighted average of the block-specific differences. With equal block weights it would instead be \((-1-1+0)/3=-0.6667\) score points. Neither summary is the sole time-independent treatment effect: the answer depends on the target population’s time distribution, and the zero late-block difference is part of the result.

Diagnostics, Alternatives, and Limitations

Before interpreting an adjusted contrast, inspect the data by enrollment time. A table of arm counts and means, like the one above, reveals whether both treatments appear in each block, whether prognosis changes, and whether the allocation share shifts. Sparse or empty treatment-by-time cells are warnings: a standardized contrast requiring a missing cell mean cannot be calculated directly without extrapolation. A fitted model may still return a number, but that number depends on the model’s assumptions rather than direct within-block information.

When the time trend is not well represented by a few blocks, a prespecified continuous-time regression or flexible trend adjustment may be more appropriate. Regression can use more detail than broad categorization but depends on the chosen functional form and on adequate overlap. Inverse-probability weighting instead uses known assignment probabilities to reweight observations toward a target allocation distribution; very small probabilities can make weights unstable. These methods address related imbalance, but they are not interchangeable without specifying the estimand and assumptions. A direct block-standardized contrast is particularly transparent when the blocks and target weights are substantively meaningful.

This calculation does not by itself provide an uncertainty interval or a hypothesis test. Those require an uncertainty estimator suited to the randomization scheme, the adaptive assignment mechanism, and the adjustment procedure. Nor does time adjustment correct unmeasured prognostic changes within blocks, outcome-dependent missingness, or an incorrectly recorded enrollment time. If treatment effects vary across time, reporting only one adjusted number can conceal that variation; display the block-specific contrasts and state the target weights.

Common pitfall: “The crude difference is close to zero, so the treatments must be similar.” That reasoning ignores how the arms’ enrollment-time distributions differ. In the first example the crude contrast is \(-0.086\) score points, while the within-block and pooled-time standardized contrasts are \(-1.000\). The correction is to show the arm-specific time composition, calculate within-block differences, and state the weights used for any adjusted summary.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. In the first example, what are the early, middle, and late pooled-time weights?
  2. Why can a crude contrast differ from a time-standardized contrast even when each block-specific contrast is the same?
  3. If block-specific treatment contrasts vary, what does pooled-time standardization summarize?
  4. What does an empty treatment-by-time cell imply for direct standardization to a target that gives that block positive weight?

Solutions. (1) The weights are \(5/31=0.1613\), \(15/31=0.4839\), and \(11/31=0.3548\). (2) The crude calculation uses different time weights in the two arms, so it also reflects differences in prognosis across their enrollment mixes; standardization uses identical weights. (3) It summarizes a weighted average of the block-specific contrasts, with weights equal to the prespecified pooled-time distribution. (4) The required block-specific mean is not observed in that arm, so direct standardization cannot estimate the target contrast without additional assumptions or a model-based extrapolation.

Clinical Biostats