Tutorials › Marginal Structural Models › Opioid Agonist Treatment and Relapse

Case Studies · Tutorial 480 of 501

Opioid Agonist Treatment and Relapse

Learn how to define treatment strategies and use inverse-probability weighting to estimate their marginal relapse risks when prior symptoms influence treatment continuation.

Advanced 11 min read

What You'll Learn

  • Define continued-treatment and planned-taper strategies for a longitudinal opioid agonist treatment study.
  • Represent recent substance use and withdrawal as time-varying confounders affected by earlier treatment.
  • Construct strategy-specific inverse-probability weights from sequential continuation probabilities.
  • State and apply the assumptions needed to identify marginal relapse risks.
  • Diagnose poor positivity, unstable weights, and treatment-strategy ambiguity.
  • Compare weighting with outcome regression and the parametric g-formula.

Why continuation decisions complicate relapse comparisons

In opioid agonist treatment, continuing treatment may depend on a patient's recent substance use and withdrawal symptoms. Those measurements also predict relapse. Further, earlier treatment can affect later substance use and withdrawal. This creates time-varying confounding affected by prior treatment: a direct comparison of patients who continued treatment with those who stopped can mix treatment effects with differences in the histories that shaped those decisions.

The target here is a contrast between explicitly defined treatment strategies, not a comparison of vaguely defined groups such as “ever treated” and “not treated.” Consider an observational cohort with two treatment decisions. At each decision, clinicians assess the patient's history and record whether agonist treatment is continued into the next interval. The outcome \(Y\) is an indicator of relapse by the end of follow-up.

Definition: Let \(V\) denote baseline covariates. For \(k=1,2\), let \(L_k\) contain measurements available just before decision \(k\), including recent substance use and withdrawal symptoms, and let \(A_k=1\) indicate continuation into the next interval (\(A_k=0\) indicates discontinuation). Write \(\bar L_k=(L_1,\ldots,L_k)\) and \(\bar A_k=(A_1,\ldots,A_k)\). The continued-treatment strategy is \(g_C=(1,1)\); the planned-taper strategy is \(g_T=(1,0)\), meaning treatment is continued for the first interval and discontinued before the second. Let \(Y^{g}\) be the relapse indicator that would occur under strategy \(g\). The strategy-specific marginal relapse risk is \(E[Y^{g}]\).

These strategies are illustrative estimands, not clinical recommendations. A study must specify the treatment, timing, and permissible deviations precisely. In particular, “discontinuation” must correspond to a defined protocol; an abrupt stop and a gradual taper are not interchangeable. The outcome window and handling of death or loss to follow-up must also be set in the protocol.

Sequential treatment weights

For a patient whose observed treatment follows a strategy \(g=(g_1,g_2)\), the probability of following it, conditional on the measured history, is \(p_g=\prod_{k=1}^2 P(A_k=g_k\mid V,\bar L_k,\bar A_{k-1})\). Here \(\bar A_0\) is empty. The inverse probability weight for that strategy is \(1/p_g\). Patients whose observed treatment does not follow \(g\) have indicator zero in the strategy-specific estimator. The treatment models must include the measured histories that jointly predict continuation and relapse, including prior substance use and withdrawal, as appropriate.

Worked Example: One Patient’s Continued-Treatment Weight

Suppose a patient has a 0.75 estimated probability of continuing at the first decision, given baseline history. At the second decision, the patient has high withdrawal symptoms and recent substance use; given this history and first-interval continuation, the estimated probability of continuing is 0.40. The patient continues at both decisions.

The estimated probability of following \(g_C=(1,1)\) is \(0.75\times0.40=0.30\). The unstabilized weight is therefore \(1/0.30=3.33\), to two decimal places. The second factor is history-specific: using an average continuation probability instead of the probability conditional on the patient's symptoms would fail to account for the measured determinants of the second decision.

This weight does not mean the patient “counts as 3.33 patients” in every analysis. It is a contribution to an estimator for the specified strategy, and its usefulness depends on the treatment models and identification assumptions.

Identification and estimation

The weighted analysis requires consistency, sequential exchangeability, and positivity. Consistency means that a patient's observed outcome equals \(Y^g\) if the observed treatment history follows \(g\), and that treatment versions are sufficiently well specified for this statement to be meaningful. Sequential exchangeability requires that, at each decision, conditional on measured history \((V,\bar L_k,\bar A_{k-1})\), treatment is independent of the relevant potential outcomes under the strategies being compared. This rules out unmeasured confounding at each decision. Positivity requires that every strategy decision has positive probability in the histories where that decision is required. Also assume independent sampling from the target population and complete outcome ascertainment; otherwise, sampling or censoring must be addressed in the analysis.

For a fixed strategy \(g\), let \(I(\bar A_2=g)\) indicate that observed treatment follows it, and let \(\hat p_g\) be the product of estimated conditional treatment probabilities for that observed history. A normalized inverse-probability-weighted estimate is

$$ \widehat{E[Y^g]}= \frac{\sum_{i=1}^n I(\bar A_{2i}=g)Y_i/\hat p_{gi}} {\sum_{i=1}^n I(\bar A_{2i}=g)/\hat p_{gi}}. $$

The same form applies to a dynamic strategy, where the required decision \(g_k\) is a rule evaluated using the patient's history at decision \(k\). For such a strategy, the indicator checks adherence to that rule at each decision, and the probability product uses the corresponding history-specific probabilities. The risk contrast can be reported as a risk difference or risk ratio, alongside the two risks.

Theorem: Under consistency, sequential exchangeability, and positivity, with correctly specified conditional treatment probabilities and complete outcome ascertainment, the population normalized weighted mean among histories following \(g\) identifies \(E[Y^g]\).

Proof. For clarity, use discrete variables; with continuous covariates, the sums below become integrals under the corresponding conditional distributions. Factor the observed-data distribution into the baseline distribution, the successive distributions of \(L_k\), the treatment probabilities, and the outcome distribution. In the numerator of the weighted population mean, restrict to \(\bar A_2=g\) and divide by \(\prod_k P(A_k=g_k\mid V,\bar L_k,\bar A_{k-1})\). At each history, this cancels the conditional probability of the observed treatment decision. The remaining terms are the baseline distribution, the covariate-history distributions under the preceding strategy decisions, and the conditional outcome distribution after the final strategy decision.

Sequential exchangeability and consistency identify those remaining covariate and outcome distributions with the distributions that would arise under intervention to follow \(g\). Thus, the numerator is \(E[I(\bar A_2=g)Y/p_g]=E[Y^g]\) times the probability-scale normalization for the restricted histories; equivalently, after dividing by the weighted denominator, the result is \(E[Y^g]\). More directly, the same cancellation gives \(E[I(\bar A_2=g)/p_g]=1\) and \(E[I(\bar A_2=g)Y/p_g]=E[Y^g]\). Their ratio is the target risk. Positivity ensures the denominators in the weights are nonzero. \(\square\)

In practice, conditional treatment probabilities are estimated rather than known. The following consistency statement describes the large-sample target of the normalized estimator.

Result: If patients are independently and identically sampled, the treatment-probability models are correctly specified, their estimates converge to the true probabilities, the relevant probabilities are bounded away from zero, and the weighted variables have finite expectations, then the normalized estimator converges in probability to \(E[Y^g]\).

Justification. Under these conditions, estimated weights converge to the true weights, and the finite-expectation condition permits the sample averages of the weighted numerator and denominator to converge to their expectations. The identification calculation gives numerator expectation \(E[Y^g]\) and denominator expectation \(1\). Since the denominator limit is nonzero, the continuous mapping theorem gives convergence of their ratio to \(E[Y^g]\). This argument does not establish that the assumptions hold in a particular cohort; it establishes the estimator’s target when they do. \(\square\)

Worked Example: Comparing Weighted Four-Week Risks

Suppose six patients follow one of the two strategies considered, with estimated probabilities of following their observed strategy and observed relapse outcomes as follows. The displayed adherent patients contribute to the corresponding strategy estimate; other patients in the full cohort who do not follow that strategy contribute zero to both its sums.

Strategy followedProbability of observed historyWeightRelapse \(Y\)
\(g_C\)0.601.6670
\(g_C\)0.402.5001
\(g_C\)0.352.8571
\(g_T\)0.205.0001
\(g_T\)0.205.0000
\(g_T\)0.422.3810

For \(g_C\), the weighted relapse total is \(1.667(0)+2.500(1)+2.857(1)=5.357\), and the weight total is \(1.667+2.500+2.857=7.024\). The estimated risk is \(5.357/7.024=0.763\). For \(g_T\), the weighted relapse total is \(5(1)+5(0)+2.381(0)=5\), and the weight total is \(5+5+2.381=12.381\). Its estimated risk is \(5/12.381=0.404\). The estimated risk difference, continued treatment minus planned taper, is \(0.763-0.404=0.359\), or about 36 percentage points.

These small-sample values illustrate the calculation, not a reliable clinical conclusion. The table does not establish that the treatment models are correct, that all confounders were measured, or that the strategies had adequate support in the target population.

Diagnostics, alternatives, and limitations

Examine the estimated continuation probabilities and weights separately for each strategy. Very small probabilities produce large weights; a few patients can then dominate the risk estimate. Check whether high weights cluster among patients with particular substance-use or withdrawal histories, whether any relevant histories lack patients following a required strategy, and whether the estimated risks change substantially under reasonable model specifications. Report weight summaries and, when useful, effective sample size, often summarized as \((\sum_i w_i)^2/\sum_i w_i^2\) among the strategy contributors. A small effective sample size signals that the nominal cohort size exaggerates the information in the weighted comparison.

Worked Example: A Positivity Warning in Severe Withdrawal

Suppose only 2% of patients with severe withdrawal continue treatment at the second decision, despite a protocol strategy requiring continuation. A patient in that history group who does continue has a second-decision inverse probability factor \(1/0.02=50\). If the first-decision probability was 0.80, the two-decision weight is \(1/(0.80\times0.02)=62.5\). One such patient can have far more influence than a patient with a less unusual history.

This is a warning, not a proof that the estimate is biased: a large weight may reflect genuine rarity, model error, or both. If the probability is actually zero in a clinically relevant history group, the strategy risk is not identified there by these data. Truncating large weights may reduce variability, but it changes the estimator and does not restore missing support; any truncation should be reported with its threshold and a sensitivity analysis.

A common mistake is to fit a relapse regression on treatment and current withdrawal, then interpret the treatment coefficient as the causal effect of sustained continuation. Because withdrawal can be affected by prior treatment and can predict later treatment and relapse, ordinary adjustment for it can block part of an earlier treatment effect while also changing confounding control for later decisions. Sequential weighting instead reweights treatment histories so that, under its assumptions, measured histories no longer determine the treatment decisions in the weighted comparison.

Outcome regression can be useful when correctly specified, and the parametric g-formula is another approach: it models successive covariate and outcome distributions and averages outcomes under each strategy. Weighting and the g-formula differ in how they model the observed data; neither removes unmeasured confounding or lack of positivity. Weighting can be sensitive to near-zero probabilities, while the g-formula can be sensitive to misspecified outcome or covariate models. A combined estimator may improve robustness under additional conditions, but is not a substitute for defining a meaningful strategy or checking support.

This analysis also has practical limits. Relapse, treatment continuation, substance use, and withdrawal must be measured with suitable timing and accuracy; measurement after a treatment decision cannot simply be treated as if it preceded that decision. Unrecorded clinical judgment can leave residual confounding. If follow-up is incomplete, the complete-ascertainment assumption fails and informative censoring requires additional methods. Finally, a four-week risk contrast does not by itself describe longer-term recovery, safety, or the effects of specific taper protocols.

Check Your Understanding

Answer each question before reading the brief solution.

  1. Why can withdrawal symptoms measured before the second treatment decision be a confounder affected by prior treatment?
  2. Under \(g_C=(1,1)\), the two continuation probabilities for a patient are 0.50 and 0.25. What is the patient's strategy weight if they continue at both decisions?
  3. Which assumption is threatened if no patients with a particular symptom history continue treatment when the strategy requires continuation?
  4. Give one reason that a large weight should prompt investigation rather than automatic truncation.

Solutions. (1) Earlier treatment can affect withdrawal; withdrawal can predict both the later continuation decision and relapse. (2) The probability of following the strategy is \(0.50\times0.25=0.125\), so the weight is \(1/0.125=8\). (3) Positivity fails for that history and strategy decision, so the strategy risk is not identified there by the observed data. (4) The large value may reflect genuinely sparse support, a misspecified treatment model, or both; truncation does not distinguish these explanations and cannot supply information where the strategy is unsupported.

Clinical Biostats