Why a Longitudinal Mean Requires Successive Conditioning
A treatment regime specifies what treatment is assigned at each decision time. In a longitudinal study, covariates measured between decisions can be affected by earlier treatment and can help determine later treatment. The mean outcome under a regime therefore depends not only on the outcome distribution, but also on how covariate histories would unfold under that regime.
The nonparametric G-formula identifies that mean by linking each step of the counterfactual history to an observed conditional distribution. Its derivation makes the role of each assumption explicit: consistency links observed and counterfactual quantities, sequential exchangeability links treatment assignment to counterfactual outcomes given history, and positivity ensures the regime's treatment choices occur in the observed data.
Notation and Identification Assumptions
Consider \(K\) treatment decisions, with covariates ordered as \(L_0,A_1,L_1,A_2,\ldots,A_K,L_K,Y\). Here \(L_0\) is measured before the first treatment, \(L_t\) is measured after \(A_t\) and before \(A_{t+1}\), and \(Y\) is the final outcome. The observed history immediately before decision \(t\) is
and the complete history before observing the outcome is \(H_{K+1}=(L_0,A_1,L_1,\ldots,A_K,L_K)\). A static regime is a fixed sequence \(\bar a=(a_1,\ldots,a_K)\). A deterministic dynamic regime instead specifies the treatment at time \(t\) as a function \(d_t(H_t)\) of the history then available.
Write \(L_t^{\bar a_t}\) for the covariate measured after the first \(t\) treatments are set to \(\bar a_t=(a_1,\ldots,a_t)\), and \(Y^{\bar a}\) for the final outcome under the full regime. For a dynamic regime, the corresponding counterfactuals use the treatments prescribed by the rule along the history that arises under that rule.
The derivation uses three assumptions. They concern the target population and the histories that can arise under the regime.
- Consistency. If a person's observed treatment history agrees with the regime through time \(t\), the observed covariate \(L_t\) equals \(L_t^{\bar a_t}\); if the full observed history agrees with the regime, the observed outcome equals \(Y^{\bar a}\). For a dynamic rule, agreement means the observed treatment at each time is the treatment prescribed for that person's observed history.
- Sequential exchangeability. At each decision time, conditional on the observed history \(H_t\), the treatment assigned is independent of the relevant future counterfactual covariates and outcomes under the regime. For a static regime, this includes independence of \(A_t\) from \(L_t^{\bar a_t},\ldots,L_K^{\bar a_K},Y^{\bar a}\), conditional on \(H_t\). The assumption applies at every time and to histories relevant to the regime.
- Positivity. At each history with positive probability under the regime, the observed data give positive probability to the treatment prescribed there. For a static regime, \(P(A_t=a_t\mid H_t=h)>0\); for a dynamic regime, \(P(A_t=d_t(h)\mid H_t=h)>0\), for relevant histories \(h\).
These assumptions are not interchangeable. Exchangeability addresses confounding at a decision; positivity addresses whether the needed conditional distribution is supported by observed treatment choices. Consistency specifies how observed data relate to the counterfactuals.
The Successive-Conditioning Argument
For a static regime, begin with the mean of the counterfactual outcome and condition on the covariate history generated under that regime. Then condition successively on the covariates at earlier times. At each decision, exchangeability and consistency allow the next counterfactual covariate distribution to be represented by an observed conditional distribution among people with the corresponding history and treatment. Positivity ensures those conditional distributions are defined where the regime needs them.
The same reasoning can be written recursively. Define \(Q_{K+1}(h_{K+1})=E[Y\mid H_{K+1}=h_{K+1}]\). Then, working backward from \(t=K\) to \(t=1\), define
The value \(Q_t(h_t)\) averages over the next covariate using the observed distribution conditional on the current history and the regime's treatment. The identified mean is
The outer expectation uses the population distribution of baseline covariates, which is unchanged by a regime that begins after \(L_0\). This recursive statement is also applicable to a dynamic regime by replacing \(a_t\) at each history with \(d_t(h_t)\).
Why the Recursion Identifies the Counterfactual Mean
The justification is backward. At the final time, among people with a complete observed history matching the regime, consistency makes \(Y\) equal to \(Y^{\bar a}\). Sequential exchangeability ensures that, within a relevant pre-treatment history, selecting those who received the regime's treatment does not select people with different future counterfactuals. Thus the observed conditional outcome distribution after the final treatment identifies the corresponding counterfactual outcome distribution.
Now move one decision earlier. Given a history \(h_t\), exchangeability allows the distribution of future counterfactuals under the regime to be recovered from those with \(H_t=h_t,A_t=a_t\). Consistency identifies their observed next covariate as the counterfactual next covariate. Averaging the already-identified future mean over this observed conditional covariate distribution gives \(Q_t(h_t)\). Repeating this step reaches the baseline, where averaging over \(L_0\) gives the population mean.
For two treatment times, the key conditioning step can be displayed directly. Let \(L_1\) be the covariate between \(A_1\) and \(A_2\). Then
where the inner expectation averages over the observed distribution of \(L_1\) given \(L_0,A_1=a_1\), and the outer expectation averages over the baseline distribution. Each replacement by an observed conditional distribution uses the assumptions at that treatment decision; the display is not justified by consistency alone.
Worked Example: One Treatment Decision and Baseline Confounding
Suppose a hypothetical population has two baseline risk groups. The low-risk group makes up 60% of the population and the high-risk group 40%. A single treatment \(A\) is assigned after baseline, and the outcome is measured afterward. The observed conditional outcome means are:
| Baseline group | Population proportion | Mean outcome if A = 1 | Mean outcome if A = 0 |
|---|---|---|---|
| Low risk | 0.60 | 8 | 5 |
| High risk | 0.40 | 12 | 9 |
Assume consistency, exchangeability of treatment and the potential outcomes given baseline risk, and positivity in both risk groups. The mean outcome if everyone were assigned treatment is obtained by averaging the treatment-specific conditional means over the baseline distribution:
For comparison, under no treatment,
Thus the identified regime-specific mean is 9.60 outcome units under treatment and 6.60 outcome units without treatment. These calculations use hypothetical conditional means; the assumptions, rather than the arithmetic, justify interpreting them as counterfactual population means.
Worked Example: Conditioning Through an Intermediate Covariate
Consider a hypothetical two-decision study. Everyone receives \(A_1=1\) under the regime. The intermediate covariate \(L_1\) is either 0 or 1. Among people with \(A_1=1\), the observed proportions are \(P(L_1=0\mid A_1=1)=0.70\) and \(P(L_1=1\mid A_1=1)=0.30\). Under \(A_2=1\), the observed mean outcome is 4 when \(L_1=0\) and 10 when \(L_1=1\).
Suppose sequential exchangeability holds at both decisions and consistency holds. Suppose also that \(A_1=1\) is possible at baseline and \(A_2=1\) is possible at each of the two \(L_1\) histories. First condition on \(L_1\), then average the conditional outcome means over the covariate distribution that follows \(A_1=1\):
The regime-specific mean is 5.80 outcome units. The \(L_1\) proportions are essential: the regime's first treatment affects which intermediate histories occur, so the final outcome means cannot simply be averaged with an unrelated or overall distribution of \(L_1\).
Worked Example: A History-Dependent Treatment Rule
In a hypothetical two-decision setting, let the rule assign \(A_1=1\), then set \(A_2=0\) if \(L_1=0\) and \(A_2=1\) if \(L_1=1\). Suppose under \(A_1=1\), the observed proportions are 0.70 for \(L_1=0\) and 0.30 for \(L_1=1\). The corresponding outcome means under the rule's second treatment are 3 and 10. Assume consistency and sequential exchangeability, and suppose \(A_1=1\), \(A_2=0\) at \(L_1=0\), and \(A_2=1\) at \(L_1=1\) each have positive probability at the relevant histories.
The rule-specific mean averages each outcome mean over the covariate history and uses the treatment prescribed for that history:
The identified mean is 5.10 outcome units. Positivity concerns the rule's actual choice in each history, not the requirement that every treatment be possible at every history. The conditional means must correspond to the treatment prescribed for that history.
Common Pitfall: Conditioning on Regime Followers
A tempting but incorrect argument is: “The mean among people who happened to follow the full regime is the mean outcome under that regime.” Following a sustained regime is generally a selected event. In particular, later treatment choices can depend on intermediate covariates affected by earlier treatment. The observed followers may therefore differ from the population that would have followed the regime under intervention.
The correction is to use the assumptions at each decision and condition on the observed history available then. Successive conditional distributions reconstruct the covariate histories under the regime, and the outcome distribution is averaged over those histories. This identifies a counterfactual mean from the observed-data distribution; it does not make an unadjusted comparison of observed treatment groups causal.
Identification also does not guarantee that an estimate will be precise or reliable in a finite sample. If positivity is weak, the observed data may provide little information for a required history even when the probability is technically greater than zero. If exchangeability is implausible because relevant confounders are missing, the algebraic recursion does not remove that bias.
Check Your Understanding
Use the assumptions and conditioning logic developed above to answer these questions.
- In the ordering \(L_0,A_1,L_1,A_2,Y\), what variables make up the observed history immediately before \(A_2\)?
- Which assumption ensures that the observed outcome among people with a matching treatment history represents their counterfactual outcome under that history?
- Why must a regime-specific mean average over the distribution of \(L_1\) that arises under the regime?
- For a dynamic rule, what treatment probability must be positive at a history where the rule assigns treatment \(d_t(h)\)?
- Explain why the mean among people who happened to follow a full longitudinal regime need not equal the mean under intervention.