Tutorials › Marginal Structural Models › Informative Loss to Follow-Up in an HIV Cohort

Case Studies · Tutorial 486 of 501

Informative Loss to Follow-Up in an HIV Cohort

Learn to construct treatment and censoring weights for an HIV cohort, estimate marginal survival under a treatment strategy, and check whether retention models represent the correct risk set.

Advanced 13 min read

What You'll Learn

  • Define the HIV-cohort risk set and distinguish death from loss to follow-up.
  • Construct sequential treatment-adherence weights for a specified treatment strategy.
  • Model retention only among patients alive and eligible to remain under observation.
  • Derive the weighted survival hazard using an inverse-probability identity.
  • Diagnose informative follow-up by examining retention probabilities and weighted risk sets.
  • Recognize when positivity, exchangeability, or model assumptions make the analysis unreliable.

Why Follow-Up Requires Its Own Weight

In an HIV cohort, treatment may change as viral load, CD4 count, or clinical status changes. Those same health measures can also predict whether a patient returns to the clinic. A patient who stops attending may therefore be unlike a patient who remains observed, even after accounting for treatment. An analysis limited to those who continue attending can then describe a selected group rather than survival in the baseline cohort.

The aim here is to estimate survival under a specified treatment strategy while accounting for both treatment selection and loss to follow-up. The essential distinction is that death is an outcome, whereas loss to follow-up is missing observation of a patient who could still be alive. A retention probability must be calculated among patients who are eligible to be retained, not among a risk set that also includes patients who have died.

Definition: Let \(t=0,\ldots,K-1\) index follow-up intervals. \(V\) denotes baseline covariates; \(L_t\) denotes measured health history available at the start of interval \(t\); and \(A_t\) denotes treatment during interval \(t\). Let \(R_t=1\) mean that the patient is alive and observed at the start of interval \(t\). For a patient with \(R_t=1\), \(D_{t+1}=1\) means death occurs during interval \(t\). If \(D_{t+1}=0\), define \(C_{t+1}=1\) to mean that the patient remains observed and eligible for follow-up at the start of the next interval; \(C_{t+1}=0\) means loss to follow-up at that boundary. Thus \(R_{t+1}=R_t(1-D_{t+1})C_{t+1}\) for patients with \(R_t=1\). The retention indicator \(C_{t+1}\) is defined only for those who survive interval \(t\).

This convention makes the timeline explicit: treatment is assigned for an interval, death during that interval is ascertained, and retention at the next boundary is assessed among survivors. In applications where clinic attendance is assessed at a different time, the indicators and conditioning set must be redefined to match that chronology.

Assumptions and Weight Construction

Let \(g=(g_0,\ldots,g_{K-1})\) be a treatment strategy, with \(g_t\) specifying the treatment to be followed during interval \(t\). A strategy might represent continuous use of a specified antiretroviral regimen, provided that the treatment definition is clinically meaningful. For this tutorial, adherence to \(g\) means \(A_t=g_t\) at every interval in which the patient remains alive and under observation.

Identification requires consistency (a patient following \(g\) has the outcome defined by that strategy), sequential exchangeability of treatment given the observed history, and positivity: each strategy action required by \(g\) has positive probability for histories that can arise under \(g\). It also requires conditionally independent censoring: among patients alive and observed at the start of an interval and following \(g\), retention is independent of their future potential survival, given the measured history used in the retention model. The corresponding retention probabilities must be positive. Correctly specified treatment and retention probability models are additionally needed when they are estimated parametrically.

Definition: For an observed patient with \(R_t=1\), define the treatment probability \(p_t=P(A_t=g_t\mid V,\bar L_t,\bar A_{t-1},R_t=1)\). Among those with \(R_t=1\) and \(D_{t+1}=0\), define the retention probability \(q_t=P(C_{t+1}=1\mid V,\bar L_t,\bar A_t,R_t=1,D_{t+1}=0)\). Here bars denote histories through the indicated time. The inverse-probability weight for an adherent, observed history through interval \(t\) is $$ W_t^g= \prod_{k=0}^{t} \frac{I(A_k=g_k)}{p_k} \prod_{k=0}^{t-1} \frac{I(C_{k+1}=1)}{q_k}. $$ The first product enforces adherence through the interval whose death outcome is being evaluated; the second corrects for retention only at earlier boundaries. A death during interval \(t\) is observed as an outcome and does not require a retention indicator for the next interval.

The treatment denominator conditions on measured health history because health can affect both treatment choice and survival. The retention denominator also includes current treatment and health history, but it conditions on survival through the interval. A stabilized marginal structural model may use numerator probabilities to reduce variability; those numerators must be chosen to preserve the intended target and included in the fitted marginal model. The examples below use the transparent, unstabilized regime-specific weights above.

Worked Example: Calculating a Two-Interval Weight

Suppose the target strategy is \(g_0=g_1=1\), where 1 denotes the specified antiretroviral treatment. A patient is observed and alive at both interval starts, follows treatment in both intervals, and remains observed after surviving interval 0. The fitted probabilities are \(p_0=0.80\), \(q_0=0.75\), and \(p_1=0.50\).

For the death outcome during interval 0, the weight is \(W_0^g=1/0.80=1.25\). Retention after interval 0 is not part of this interval-0 outcome weight.

For the death outcome during interval 1, the patient must have remained observed after interval 0. The weight is \(W_1^g=(1/0.80)(1/0.50)(1/0.75)=1.25\times2\times1.333\ldots=3.333\ldots\). The retention factor corrects the prior selection at the interval-1 risk set; it is not a correction for death.

If the patient had died during interval 0, no \(C_1\) or interval-1 treatment probability would be used. The observed death contributes to the interval-0 outcome, and the patient is no longer eligible for retention at the next boundary.

Why the Retention Denominator Must Exclude Deaths

The censoring identity behind the weight is conditional on being alive and eligible for retention. Let \(H_t=(V,\bar L_t,\bar A_t)\) denote the measured history through interval \(t\), and consider patients with \(R_t=1,D_{t+1}=0\). If \(q_t=P(C_{t+1}=1\mid H_t,R_t=1,D_{t+1}=0)>0\), then for any integrable function \(h(H_t)\),

$$ E\left[ \left. \frac{I(C_{t+1}=1)}{q_t}h(H_t) \right|R_t=1,D_{t+1}=0 \right] = E\left[h(H_t)\mid R_t=1,D_{t+1}=0\right]. $$

To verify the identity, condition first on \(H_t,R_t=1,D_{t+1}=0\). Under that conditioning, \(h(H_t)\) and \(q_t\) are fixed, and the conditional expectation of \(I(C_{t+1}=1)\) is \(q_t\). Therefore,

$$ E\left[ \left. \frac{I(C_{t+1}=1)}{q_t}h(H_t) \right|H_t,R_t=1,D_{t+1}=0 \right] = \frac{q_t}{q_t}h(H_t)=h(H_t). $$

Taking the conditional expectation over \(H_t\) gives the stated identity. The argument would fail as a retention correction if the denominator instead mixed people who died with survivors: death is not a retention decision, and a patient who died cannot be reweighted into the next risk set.

Worked Example: Separating Mortality From Retention

Consider two health groups among patients observed at the start of an interval. In a high-risk group, 40% die during the interval; in a lower-risk group, 10% die. Suppose that among survivors in either group, 80% are retained. Assume no other loss of observation.

The correct retention probabilities are \(q_{\text{high}}=0.80\) and \(q_{\text{low}}=0.80\), because each is calculated among survivors. The correct inverse retention factor is \(1/0.80=1.25\) in both groups.

If instead one used the probability of being alive and retained at the next boundary among everyone alive at the start, the values would be \(0.60\times0.80=0.48\) for the high-risk group and \(0.90\times0.80=0.72\) for the lower-risk group. Their inverse factors would be \(2.083\ldots\) and \(1.389\ldots\). Those factors would upweight the high-risk survivors merely because more high-risk patients died. They would combine survival and retention rather than repair selection due to loss to follow-up.

The distinction is consequential even though retention itself is identical in the two groups. A retention model should describe the chance of remaining observed among patients who can remain observed, not the chance of reaching the next risk set through both survival and retention.

From Weighted Risk Sets to Marginal Survival

Under the stated assumptions, the weighted risk set at each interval represents the cohort that would be observed under strategy \(g\), rather than only the subset whose treatment and clinic attendance happened to match \(g\). Let \(S^g(t)\) denote the probability of surviving through \(t\) intervals under that strategy, and let \(h_t^g\) be the corresponding conditional probability of death in interval \(t\), given survival to its start. Then

$$ S^g(0)=1,\qquad S^g(t+1)=S^g(t)(1-h_t^g), \qquad S^g(t)=\prod_{k=0}^{t-1}(1-h_k^g). $$

An empirical weighted hazard can be formed as the weighted number of deaths divided by the weighted number at risk:

$$ \widehat h_t^g= \frac{\sum_{i=1}^{n} W_{it}^g I(R_{it}=1)D_{i,t+1}} {\sum_{i=1}^{n} W_{it}^g I(R_{it}=1)}, \qquad \widehat S^g(t)=\prod_{k=0}^{t-1}(1-\widehat h_k^g). $$

This is a plug-in weighted survival calculation, not a guarantee of unbiased finite-sample estimates. Its causal interpretation relies on identification assumptions, adequate probability models, and sufficient data in the relevant histories. In particular, the denominator at time \(t\) uses the weights for adherence through \(t\) and retention through prior boundaries, as specified above.

Result: Under consistency, sequential treatment exchangeability and positivity, and conditionally independent censoring with positive retention probabilities, the expected inverse-probability weighted contribution from observed histories under \(g\) recovers the corresponding full-data contribution under \(g\), when the probabilities in the weights are the true conditional probabilities.

The justification is sequential. At each treatment decision, conditional on the measured history, the factor \(I(A_t=g_t)/p_t\) has conditional expectation one among histories eligible for that decision, with the selected treatment action fixed to \(g_t\). Sequential exchangeability permits the outcome distribution among those who received that action to represent the counterfactual outcome distribution under the action. At each subsequent retention boundary, conditional on being alive, the identity proved above shows that \(I(C_{t+1}=1)/q_t\) restores the full distribution of measured histories among eligible survivors. Iterating these conditional expectations from \(t=0\) through the interval of interest yields the full-data distribution under \(g\). Consistency identifies the observed outcomes of adherent patients with those counterfactual outcomes. Multiplying the resulting interval-specific survival probabilities gives the survival expression above. This argument identifies the target; consistency of estimated hazards additionally requires appropriate estimation conditions, such as correct parametric models and regularity for the sample averages to converge.

Worked Example: A Weighted Interval Hazard

Suppose three patients are alive and observed at the start of an interval, and all follow the target treatment. Their weights, including any needed prior retention factors, are \(1.25\), \(2.00\), and \(0.80\). The first patient dies during the interval; the other two survive. The weighted risk total is \(1.25+2.00+0.80=4.05\), and the weighted death total is \(1.25\).

Thus \(\widehat h=1.25/4.05=0.3086\) (to four decimal places), and estimated survival across this interval is \(1-0.3086=0.6914\). The individual who dies contributes to the numerator and denominator because death is observed. No retention factor for the following boundary is needed to count that death. This small calculation illustrates the estimator, but three observations are far too few for stable inference.

Diagnostics, Alternatives, and Limits

A fitted model is not reassuring merely because it converges. Examine treatment and retention probabilities separately, and inspect the people who remain under observation. Useful checks include:

  • Tabulate the numbers alive, dead, retained, and lost at each interval, distinguishing deaths from losses among survivors.
  • Compare health history and prior treatment between retained and lost patients among those alive at the boundary. Large differences indicate that unweighted follow-up is selective and help assess whether the retention model includes relevant predictors.
  • Inspect the distribution of treatment and censoring weights by interval. Very large weights often indicate near-positivity violations or unstable probability estimates.
  • Check that every retention model is fitted to the eligible survivor set and that its outcome is retention, not a composite of survival and retention.
  • Assess whether predicted probabilities are calibrated within clinically important health and treatment strata, and whether strata with predicted probabilities near zero contain enough observations.

The principal alternative is a complete-case analysis that simply excludes patients after they stop attending. It is easy to compute, but is generally biased when retention depends on measured predictors of survival. A regression model for survival can adjust for measured covariates, but ordinary adjustment alone does not necessarily undo selection caused by time-varying treatment and dropout; the estimand and adjustment structure must be appropriate. Inverse-probability weighting instead reconstructs the target risk sets through modeled treatment and retention probabilities. It does not solve unmeasured confounding, incorrect models, or lack of positivity. Large weights can also make estimates highly variable, while truncating weights trades some variance reduction for potential bias.

Common pitfall: Defining \(q_t\) as the probability of being retained at the next interval conditional only on \(R_t=1\) can include patients who die during interval \(t\). The resulting inverse factor partly reweights mortality, even when there is no loss to follow-up. Define retention among those who are alive at the end of the interval, \(P(C_{t+1}=1\mid V,\bar L_t,\bar A_t,R_t=1,D_{t+1}=0)\), and apply that factor only to survivors eligible to enter the next risk set.

A second limitation is that measured clinic attendance and health history must be recorded at the right times. If health is measured only at visits, the very patients who stop attending may have missing predictors of their dropout. A model cannot adjust for an unmeasured history merely by including many terms. The result is also strategy-specific: the estimated survival pertains to the stated treatment rule and target baseline population, not automatically to every possible antiretroviral policy.

Check Your Understanding

Answer each question, then check the brief solutions below.

  1. A patient is alive and observed at the start of interval \(t\), but dies during that interval. Does the patient enter the retention model for \(C_{t+1}\)?
  2. If the probability of retention among survivors is \(0.5\), what inverse retention factor applies to a survivor who remains observed?
  3. Why is \(P(C_{t+1}=1\mid R_t=1)\) not generally the correct retention probability under the definitions here?
  4. Suppose a treatment action required by \(g\) has estimated probability \(0.01\) for a common measured history. What concern should this raise?
  5. Among 20 patients alive at an interval boundary, 12 are retained. If all have identical modeled retention probability, what is that probability and its inverse factor?

Solutions. (1) No. The patient died and is not eligible for retention at the next boundary; the death is an observed outcome. (2) \(1/0.5=2\). (3) It can combine death with retention, although death is an outcome and not a loss-to-follow-up decision. (4) This signals a potential positivity problem and a very large treatment weight, so estimates may be unstable and the strategy may not be supported by the data. (5) The probability is \(12/20=0.60\), and the inverse factor is \(1/0.60=1.667\) approximately, provided those 20 are the eligible survivors and the common-probability assumption is appropriate.

Clinical Biostats