Tutorials › Marginal Structural Models › Treatment Switching During Cancer Follow-Up

Case Studies · Tutorial 488 of 501

Treatment Switching During Cancer Follow-Up

Learn to estimate survival under sustained chemotherapy strategies when tumor response and toxicity affect both treatment switching and continued observation.

Advanced 11 min read

What You'll Learn

  • Define sustained chemotherapy strategies and the marginal survival they target.
  • Distinguish actual treatment switching from artificial censoring at strategy deviation.
  • Construct treatment and follow-up weights from response and toxicity histories.
  • Derive how weighting recovers the survival distribution under a prespecified strategy.
  • Calculate a weighted discrete-time survival estimate and interpret its risk sets.
  • Diagnose weak support, misspecified models, and informative loss to follow-up.

Why switching matters in cancer follow-up

In an observational cancer cohort, clinicians may change chemotherapy after seeing a tumor response, progression, or toxicity. Those same measurements predict survival. A comparison of patients who switch with patients who continue can therefore reflect both treatment effects and the clinical histories that prompted the change. Follow-up can also end selectively: toxicity or worsening disease may make a patient more likely to leave observation.

The question here is not simply whether patients who switched survived longer. It is how survival would differ if the cohort followed prespecified treatment strategies, such as continuing an initial regimen whenever clinically eligible. A marginal structural analysis addresses this by weighting the observed histories so that, within each strategy, treatment and observation are not selectively determined by the measured response and toxicity history.

Definition: Let \(T^g\) be the potential event time under a prespecified treatment strategy \(g\), and let \(S^g(t)=P(T^g>t)\) be its marginal survival function in the baseline cohort. A strategy may specify a regimen at each visit, or an action as a function of measured history. A sustained regimen is a strategy that calls for the same regimen at every relevant visit, subject to any explicitly stated eligibility rule.

For discrete follow-up, let \(L_k\) denote information measured before the treatment decision at visit \(k\), including tumor response and toxicity; let \(A_k\) denote the treatment received; and let \(H_k\) be the measured history available for that decision. Let \(Y_{k+1}=1\) indicate the event in the next interval, and let \(C_{k+1}=1\) indicate loss to follow-up before that interval’s outcome is ascertained. The patient must be alive and under observation to contribute to a later risk set.

Representing the strategy and the weights

To estimate survival under \(g\), retain a patient’s observed record only while treatment follows \(g\). The first treatment that differs from the strategy creates an artificial censoring time for that strategy-specific analysis. This is an analytic device, not a claim that the patient disappeared from the original study. A patient can be censored from one strategy analysis but remain relevant to another.

Among patients who remain alive and uncensored at visit \(k\), define \(p_j(g_j(H_j)\mid H_j)\) as the conditional probability of receiving the treatment required by the strategy at visit \(j\). Define \(q_j(H_j,A_j)\) as the conditional probability of remaining observed long enough to ascertain the next interval’s outcome. These probabilities are evaluated among patients eligible for the corresponding decision or follow-up interval.

Definition: The unstabilized weight through interval \(k\), for a patient whose treatment has followed \(g\) and who has remained observed, is $$ W_k^g=\prod_{j=0}^{k} \frac{1}{p_j(g_j(H_j)\mid H_j)\,q_j(H_j,A_j)}. $$ A patient who has deviated from \(g\) or been censored contributes no further person-time to that strategy’s risk sets. The treatment factors correct selection into the strategy; the \(q_j\) factors correct selection into continued observation.

This expression assumes the visit-specific probabilities are defined for the history available immediately before the relevant treatment and observation decisions. In applications, these probabilities are estimated from models using baseline characteristics and the measured time-varying history. The weight is updated over follow-up; it is not a single baseline adjustment.

Worked Example: A Toxicity-Driven Switch

Suppose a strategy specifies continuing regimen A at the second visit. Among patients with a particular recorded response and toxicity history, the estimated probability of receiving A is \(0.40\). For a patient who does receive A, the estimated probability of remaining observed through the next outcome assessment is \(0.80\). The patient has followed the strategy so far and remains observed.

The treatment contribution to the weight is \(1/0.40=2.5\). The observation contribution is \(1/0.80=1.25\). Thus the cumulative contribution from this visit is $$ \frac{1}{0.40\times 0.80}=3.125. $$

The calculation says that this observed history represents more of the target strategy population than a history in which continuing A and remaining observed were nearly certain. It does not say the patient’s outcome should be multiplied by 3.125 in isolation and interpreted as a personal prognosis. The weights operate across the risk set to reconstruct a marginal comparison.

Identification and the weighted survival calculation

Weighting identifies \(S^g(t)\) only under substantive assumptions. Consistency requires that a patient whose observed treatment history follows \(g\) has the potential outcome \(T^g\) equal to the observed outcome. The strategy and regimens must be sufficiently well-defined that “following \(g\)” has a meaningful interpretation. There must be no interference between patients’ treatments and outcomes.

Sequential exchangeability for treatment requires that, among patients alive and at risk at each visit, the treatment choice is independent of the relevant potential future outcomes under \(g\), conditional on the measured history \(H_k\). In a cancer setting, this requires adequate measurement of clinical drivers such as response, toxicity, disease progression, and other factors used in switching decisions. Conditional independent censoring requires that, given the measured history and treatment, loss to follow-up carries no further information about the potential outcome. Finally, positivity requires positive probabilities for receiving the strategy-specified treatment and remaining observed at every history that occurs with positive probability in the target population.

Theorem: Under consistency, no interference, sequential exchangeability for treatment, conditional independent censoring, and positivity, the weighted distribution of observed outcomes among patients adhering to \(g\) and remaining observed identifies the distribution of \(T^g\). In particular, its marginal survival function identifies \(S^g(t)\).

Justification. Factor the observed-data probability of a history into successive conditional probabilities for each treatment decision, each subsequent measured history, and each interval outcome. Restrict attention to records with \(A_j=g_j(H_j)\). Multiplication by the inverse treatment probability \(1/p_j(g_j(H_j)\mid H_j)\) cancels the factor for selecting that treatment at visit \(j\). Likewise, among those observed, multiplication by \(1/q_j(H_j,A_j)\) cancels the factor for remaining observed through the required outcome assessment.

After these cancellations, the weighted history has the same successive treatment choices as strategy \(g\), rather than the treatment choices selected by the observed clinical process. Sequential exchangeability allows the conditional outcome and history distributions among those who received the specified treatment to be used for the corresponding potential outcomes; consistency connects those potential outcomes to the observed outcomes of adherers. Applying this argument at each visit, in order, yields the distribution generated by following \(g\) from baseline. Positivity ensures that the divisions are defined for histories in the target population. Taking the probability of survival past \(t\) gives \(S^g(t)\). \(\square\)

In practice, a discrete-time weighted survival curve can be formed from weighted risk sets. Let \(R_k^g\) be the patients alive at the start of interval \(k\), observed through the required outcome assessment, and adherent to \(g\) through that interval. Let \(d_i\) indicate an event in the interval and \(W_{ik}^g\) be the patient’s weight. The weighted event hazard estimate and product-limit survival estimate are

$$ \widehat{\lambda}_k^g= \frac{\sum_{i\in R_k^g}W_{ik}^g d_i} {\sum_{i\in R_k^g}W_{ik}^g}, \qquad \widehat{S}^g(K)=\prod_{k=0}^{K-1}(1-\widehat{\lambda}_k^g). $$

The hazard ratio inside each product is a weighted event total divided by a weighted risk set, not the fraction of all baseline patients who eventually had an event. The next example works this out directly.

Worked Example: Two Weighted Survival Intervals

Suppose that, for one strategy, the first interval has total risk-set weight \(10\), including a weighted event total of \(2\). The estimated first-interval hazard is \(2/10=0.20\), so survival through that interval is \(1-0.20=0.80\).

At the start of the second interval, the weighted risk set is \(8\), and the weighted event total is \(1.5\). The second-interval hazard is \(1.5/8=0.1875\). The product-limit estimate through two intervals is $$ \widehat{S}^g(2)=(1-0.20)(1-0.1875) =0.80\times0.8125=0.65. $$

The weighted risk set falls from \(10\) to \(8\) because the first-interval event total is \(2\). The noninteger total \(1.5\) is permissible: it is a sum of weights, not a count of people. The calculation uses the risk set at each interval and therefore respects the sequence of event times.

Checking the analysis and its limits

Weights are a correction for measured selection, not a substitute for clinical information that was never recorded. Before interpreting a curve, inspect whether treatment and censoring models include the relevant pre-decision histories and whether the estimated probabilities are plausible within clinically important response and toxicity groups. A strategy that is rarely followed by patients with a particular history may have little empirical support, even if its overall treatment frequency appears adequate.

Useful diagnostics include tabulating switching and loss-to-follow-up rates by response and toxicity history; checking weighted balance of these measured histories across strategy groups at successive visits; and examining the distribution of the cumulative weights and the amount of weighted information in each risk set. A sharp reduction in the risk set, very large weights, or poor post-weighting balance warns that the estimate may be unstable or that the probability models are inadequate. Such diagnostics cannot establish that all confounding has been removed.

Worked Example: Correcting for Differential Observation

In a simple interval, 50 patients have high toxicity and 50 have low toxicity. Among the high-toxicity patients, 25 remain observed; 20 of those 25 survive the interval. All 50 low-toxicity patients remain observed, and 40 survive. Suppose, for this illustration, that observation is independent of survival within each toxicity group and that the target cohort contains 50 patients in each group.

The high-toxicity group has an observation probability of \(25/50=0.50\), so each observed patient receives censoring weight \(1/0.50=2\). The low-toxicity group’s observation probability is \(50/50=1\), so its weight is \(1\). The weighted risk total is $$ 25(2)+50(1)=50+50=100. $$ The weighted survivor total is $$ 20(2)+40(1)=40+40=80. $$ Thus the weighted survival proportion is \(80/100=0.80\). Within the high-toxicity group it is \(20/25=0.80\), and within the low-toxicity group it is \(40/50=0.80\), which checks the calculation. The unweighted observed proportion is also \(60/75=0.80\) in these particular numbers; weighting is still necessary in general because the observed group proportions need not match the target cohort’s proportions.

The example isolates censoring weights and assumes the group-specific observation probabilities are known. In a real analysis, treatment weights may also be needed, and probabilities are usually estimated from histories. If the high-toxicity survivors had instead been counted as 10, the weighted survivor total would be \(10(2)+40=60\), not 80. That would conflict with the stated data: \(50\times0.40=20\), so 20—not 10—high-toxicity patients survive.

The main alternatives answer different questions or require different assumptions. An intention-to-treat comparison by initial regimen avoids artificial censoring at later switches but targets the effect of initial assignment or initiation, not necessarily sustained treatment. An as-treated comparison groups patients by what they actually received and is vulnerable to the time-varying confounding that response and toxicity create. A conventional time-dependent regression can adjust for current measurements, but direct adjustment for a time-varying confounder affected by prior treatment can change the causal estimand or induce bias. Inverse-probability weighting instead constructs a marginal comparison under the specified strategies, provided its assumptions hold.

This approach has important limitations. It relies on correctly measured histories, adequate treatment and censoring models, and positivity. Unmeasured disease severity can leave residual confounding; poorly specified models can leave measured confounding; and weak support can make a strategy-specific estimate depend heavily on a few patients. The estimand also depends on the strategy definition: “continue chemotherapy” is incomplete unless regimen, visit schedule, and rules for eligibility or discontinuation are specified. The weighted curve describes a marginal population strategy, not the expected outcome for every individual patient.

Common mistake

  • Wrong reasoning: “Patients switched after toxicity, so I will adjust for toxicity in an ordinary outcome regression and compare the resulting treatment coefficients.” This can condition directly on a post-treatment variable that both predicts future treatment and may itself have been affected by earlier treatment.
  • Correction: State the strategy and target survival first. Use the measured pre-decision history in the treatment and censoring probability models, then weight adherent, observed records to represent the strategy population. This addresses measured time-varying selection under the assumptions above; it does not guarantee control of unmeasured confounding.
Key takeaway: For marginal survival under a prespecified chemotherapy strategy, switching is handled by censoring at strategy deviation and weighting by the inverse probability of following the strategy. Informative loss to follow-up requires an additional observation weight. Both corrections depend on measured histories, positivity, and adequate probability models.

Check Your Understanding

Answer each question, then check the solutions below.

  1. A strategy calls for regimen B at a visit. Given the recorded history, the probability of receiving B is \(0.25\), and the probability of remaining observed is \(0.80\). What is the combined weight contribution at that visit?
  2. Why is a treatment switch usually represented as artificial censoring in a strategy-specific analysis?
  3. In a weighted interval, the risk-set total is \(12\) and the weighted event total is \(3\). What are the estimated interval hazard and survival factor?
  4. Name one assumption needed to use inverse-probability weights to identify \(S^g(t)\), and describe what can fail if it does not hold.

Solutions. (1) The combined contribution is \(1/(0.25\times0.80)=1/0.20=5\). (2) A switch makes the observed treatment history depart from the prespecified strategy; artificial censoring keeps only the follow-up that represents adherence, while weighting corrects the selective probability of remaining adherent. (3) The hazard is \(3/12=0.25\), and the survival factor is \(1-0.25=0.75\). (4) For example, positivity requires a positive probability of receiving the strategy-specified treatment at each relevant history. If some histories never receive that treatment, the required inverse probability is undefined and the strategy outcome is not identified from those observed data.

Clinical Biostats