Why Assumptions Matter for Longitudinal Weights
In a longitudinal study, treatment at one time can affect a covariate measured later, and that covariate can influence both subsequent treatment and the outcome. Consequently, the observed patients who follow a particular treatment history may differ from the target population in ways that matter for the outcome. Weighting aims to address this selection by using the probabilities of the treatment decisions actually observed.
A weight is not, by itself, a guarantee of causal interpretation. Its justification depends on assumptions about how treatment histories relate to potential outcomes and on whether each treatment decision has a positive probability at the histories relevant to the analysis. This tutorial states those assumptions and shows how they lead from observed treatment assignment probabilities to marginal treatment-history means.
Histories and Potential Outcomes
Suppose treatment is assigned at \(K\) visits. Let \(A_t\) denote treatment at visit \(t\), and let \(L_t\) denote measured covariates available before treatment at that visit. Write \(\bar A_t=(A_1,\ldots,A_t)\) and \(\bar L_t=(L_1,\ldots,L_t)\). A fixed treatment history, or regime, is \(\bar a=(a_1,\ldots,a_K)\). Let \(Y^{\bar a}\) be the outcome that would be observed if treatment were set to that history. The observed outcome is \(Y\).
The covariate history \(\bar L_t\) and treatment history \(\bar A_{t-1}\) together form the information available immediately before the decision at visit \(t\). Treatment-assignment probabilities are conditional on this observed history:
Here \(q_t\) is the probability of receiving the regime's treatment at visit \(t\), among individuals with the specified prior treatment and covariate history. The relevant probabilities can vary across histories and visits.
Consistency connects an observed outcome to a counterfactual outcome, but only for the history actually received. It does not say that people who received \(\bar a\) are comparable to everyone in the target population. That comparison requires an additional assumption.
This is an assumption about the adequacy of the measured history, not a result guaranteed by fitting a treatment model. If an unmeasured factor affects both treatment and the potential outcome, conditioning on the recorded history may not remove treatment selection. In practice, covariates need to be measured before the decision they are intended to explain.
Positivity is history-specific. It is not enough that both treatment options occur somewhere in the study. If, for a particular covariate and treatment history, nobody can receive the treatment required by the regime, the observed data contain no direct information about that part of the regime.
How Treatment Probabilities Produce Weights
For a fixed regime, consider individuals whose observed treatment history matches \(\bar a\). Their inverse-probability weight is larger when their observed treatment path was less likely given their measured histories. The regime-specific weight, including the indicator for matching the entire history, is
The indicator \(I(\bar A=\bar a)\) is 1 for individuals who followed the regime and 0 otherwise. The product in the denominator is the probability of following that history, conditional on the covariate histories encountered along the way. Under consistency, sequential exchangeability, and positivity, the weighted outcome has expectation equal to the marginal mean under the regime:
The right side averages the potential outcome over the target population; it is not an outcome mean restricted to people who naturally followed \(\bar a\). Contrasting such marginal means for two treatment histories gives a causal contrast for those histories, provided the assumptions apply to both.
Why the Identification Equality Holds
A short change-of-measure argument shows the role of the probabilities. First consider a discrete covariate history for clarity; the same argument uses integrals for continuous covariates. For individuals whose treatment path is \(\bar a\), the observed joint probability of covariate history \(\bar l_K\) and treatment history \(\bar a\) factors into the probability of the covariate history and the successive treatment probabilities. Dividing by the product of those treatment probabilities cancels treatment selection:
The product of covariate probabilities on the right is the distribution of covariate histories that would arise as treatment is set successively to \(\bar a\). Sequential exchangeability and consistency make the conditional observed outcome mean in the expression equal to the corresponding conditional potential-outcome mean under \(\bar a\). Averaging those means over the covariate histories generated under the regime gives \(E(Y^{\bar a})\). Thus weighting removes the treatment-assignment factors while retaining the covariate-history distribution that belongs to the intervention.
This argument identifies a population quantity. In a finite sample, weights and weighted averages are calculated from estimated treatment probabilities; sampling variation and errors in those estimates remain. The equality does not imply that a weighted estimate in every finite sample will equal the causal mean exactly.
Worked Example: Checking the Assumptions in a Two-Visit Study
Suppose a hypothetical study evaluates two visits of a treatment, with a symptom measure \(L_2\) recorded before the second treatment. Investigators want the mean outcome under the history \(\bar a=(1,1)\), meaning treatment at both visits. They measure baseline severity \(L_1\), the symptom measure \(L_2\), prior treatment \(A_1\), and the outcome \(Y\).
Consistency. If a participant actually receives treatment at both visits, that participant’s observed outcome is \(Y^{(1,1)}\), assuming the treatment versions are well-defined and there is no interference. This links observed outcomes from that history to the corresponding potential outcomes.
Sequential exchangeability. At visit 1, the assumption requires that, conditional on \(L_1\), the treatment decision carries no additional information about future potential outcomes or covariates under \((1,1)\). At visit 2, it requires the same conditional independence given \(L_1,L_2,A_1\). Measuring \(L_2\) before \(A_2\) matters: if symptoms influence both the second treatment and the outcome, omitting them would leave relevant treatment selection uncontrolled.
Positivity. If some participants with a particular \((L_1,L_2,A_1)\) history can never receive \(A_2=1\), then the probability of the required second treatment is zero for those histories. The mean under \((1,1)\) cannot be identified for the full target population from those data without additional assumptions or a changed target population.
The measured variables make the exchangeability claim more plausible only if they capture the common causes of treatment and potential outcomes. A list of covariates, on its own, does not establish that claim.
Worked Example: Calculating a Regime-Specific Weight
Consider a hypothetical participant whose observed history matches \((1,1)\). Given the participant’s measured histories, suppose the treatment-assignment probabilities are \(q_1=0.80\) and \(q_2=0.75\). The observed outcome is 12 points on a scale where higher values indicate worse symptoms.
The probability of this treatment path conditional on the histories is the product \(0.80\times0.75=0.60\). The participant’s regime-specific weight is therefore
The weighted outcome contribution is \(1.667\times12=20.00\) weighted points. This contribution alone is not an estimate of the population mean: the target mean is obtained from contributions across the sample using the relevant weighted-average procedure. The calculation illustrates why the participant receives more representation than someone with a more probable observed path. It relies on positive assignment probabilities and does not resolve unmeasured confounding.
Worked Example: Seeing Positivity Failure in a Stratum
Suppose, in another hypothetical two-visit study, the desired regime requires \(A_2=1\). Among participants with a particular measured history, the estimated probability of \(A_2=1\) is \(0.02\). For a participant in that history who receives \(A_2=1\), the contribution from this visit to the inverse-probability factor is
That large factor reflects that only a small fraction of comparable participants received the required treatment. If the probability were exactly zero instead, no participant in the stratum could follow the regime at this visit, and the inverse probability would be undefined. The data would provide no weighted observations representing that stratum under the regime. A small positive probability permits formal identification under the assumptions but can make estimation highly unstable; a zero probability violates positivity and prevents identification for that part of the target population.
What Weighting Does—and Does Not—Do
Conceptually, weighting constructs a population in which the treatment decisions are no longer selectively tied to the measured histories in the same way as in the observed population. Individuals who followed an uncommon but possible treatment path receive greater weight, so that their outcomes can represent others who, under the measured history, might have followed the same path. The resulting target remains marginal: it averages outcomes over the covariate histories that would occur under the specified treatment regime.
Weighting does not alter any individual’s observed outcome, create observations for unsupported histories, or guarantee that every confounder was measured. If sequential exchangeability fails, weighting by measured treatment probabilities may leave confounding. If positivity fails, no finite inverse-probability factor can recover information absent from the data. These are substantive limitations, not problems that can be cured merely by calculating weights.
Common Mistake
- Wrong reasoning: “Both treatments appear in the study, so positivity holds, and weighting makes the treatment groups exchangeable.”
- Correction: Positivity must hold at each visit within the histories relevant to the regime, not just in the overall sample. Weighting can address selection represented by measured histories only when sequential exchangeability is credible. Check treatment probabilities across histories and justify which confounders were measured before each decision.
Check Your Understanding
Answer each question using the longitudinal treatment setting described above.
- What does consistency assert for an individual who actually follows a specified treatment history?
- Why must a time-varying confounder be measured before the treatment decision it is meant to help explain?
- Suppose the probability of the required treatment is positive overall but zero for one relevant covariate history. Which assumption fails, and what does that imply for identifying the regime mean?
- If the conditional treatment probabilities for a matched two-visit history are \(0.50\) and \(0.80\), what is the regime-specific inverse-probability factor?
- Does a large weight establish that sequential exchangeability holds? Explain why or why not.