Why the Treatment-Assignment Model Disappears
In observed data, treatment is assigned according to the clinical or social process that generated the study. Under an intervention, treatment is instead set according to a specified regime. These are different distributions. The parametric g-formula uses models for how covariates and outcomes evolve under specified treatment values; it does not need to simulate the observed treatment-assignment process.
That distinction is not a claim that treatment assignment is unimportant. Assignment can be strongly associated with prognosis, and its probabilities help characterize confounding and the support available in the data. The point is narrower: once the intervention fixes treatment, the observed assignment probability is not a factor in the intervention distribution being averaged.
For clarity, first consider finite-valued treatments and covariates. The observed-data distribution factors into a baseline distribution, treatment-assignment factors, covariate-transition factors, and a terminal outcome factor:
Under regime \(d\), the factors \(g_t\) are not used to generate treatment. The intervention sets \(a_t=d_t(C_t)\). The distribution of later covariates and the outcome still depends on those assigned values, so their conditional models must retain treatment history as appropriate.
where \(a_t^d=d_t(\bar l_t,\bar a_{t-1}^d)\) is the treatment specified by the regime along that covariate history. For continuous covariates, the sums are integrals with respect to the relevant distributions. The expression requires a model for the baseline distribution, the covariate transitions, and the conditional outcome mean. It contains no \(g_t\) factor.
Deriving the Intervention Distribution
The cancellation is a consequence of replacing the assignment mechanism, not an approximation that treats observed treatment as random. For each history, a deterministic intervention assigns probability one to its prescribed treatment and zero to other values. Thus the treatment factor under intervention is an indicator, not the observed conditional probability.
Separate the treatment factors \(g_t\) from the conditional distributions of covariates and the outcome.
For each time \(t\), use the point-mass factor \(I\{a_t=d_t(C_t)\}\), where \(I\{\cdot\}\) is one when its condition holds and zero otherwise.
The indicator permits only the regime-prescribed treatment at each history. Summing over \(\bar a_K\) removes the treatment factors and evaluates each \(q_t\) and outcome distribution at \(\bar a_K^d\).
More formally, the intervention joint distribution is the observed baseline, covariate, and outcome kernels multiplied by \(\prod_{t=0}^{K}I\{a_t=d_t(C_t)\}\). To obtain the marginal distribution of covariates and \(Y\), sum this joint distribution over all treatment sequences. At each step only the sequence consistent with \(d\) contributes. The result is the product of the baseline distribution and the covariate and outcome kernels evaluated along that sequence. Taking the expectation of \(Y\) gives the displayed g-formula. This derivation proves the algebraic form of the intervention distribution; identification of its kernels from observed data requires the assumptions below. \(\square\)
In a parametric implementation, the corresponding conditional models must also be adequately specified for the target histories. A correctly specified treatment model cannot repair a misspecified covariate-transition or outcome model in the g-formula. Conversely, omitting a treatment model from the g-formula does not by itself establish exchangeability or positivity.
Worked Examples
Worked Example: A One-Time Intervention
Suppose \(L\) is a binary baseline risk factor with \(P(L=1)=0.40\). Under treatment \(A=1\), the outcome risks are \(0.20\) when \(L=1\) and \(0.05\) when \(L=0\). The observed treatment probabilities are \(P(A=1\mid L=1)=0.80\) and \(P(A=1\mid L=0)=0.30\). Find the g-computation risk under the intervention \(A=1\) for everyone.
The intervention mean standardizes the conditional outcome risks over the baseline covariate distribution:
Substituting the values gives
The estimated regime risk is \(0.11\). The probabilities \(0.80\) and \(0.30\) describe which people actually received treatment; neither is multiplied into this standardization. They can matter for whether the required treated histories are represented well enough to estimate the conditional risks, but they are not regime weights in this calculation.
Worked Example: Treatment-Confounder Feedback
Consider two treatment times, \(A_0\) and \(A_1\), and an intermediate binary covariate \(L_1\). Use the regime \(A_0=A_1=1\). Suppose \(P(L_1=1\mid A_0=1)=0.30\), and the terminal outcome risks under \(A_1=1\) are \(0.40\) for \(L_1=1\) and \(0.10\) for \(L_1=0\). In the observed data, suppose \(P(A_0=1)=0.20\), \(P(A_1=1\mid L_1=1,A_0=1)=0.90\), and \(P(A_1=1\mid L_1=0,A_0=1)=0.30\). Calculate the regime risk.
First average the outcome risks over the covariate distribution that would arise after \(A_0=1\):
The assignment probabilities do not enter this calculation. Under the regime, both treatment values are set to one; the \(L_1\) transition distribution is evaluated under \(A_0=1\), and the outcome risks are evaluated under \(A_1=1\). The observed probability of receiving \(A_0=1\), or of receiving \(A_1=1\) conditional on \(L_1\), describes selection into treatment, not the distribution generated by the intervention.
Worked Example: Why a Treatment Model Alone Is Not the G-Formula
Let \(L\) be binary with \(P(L=1)=0.50\). The treatment probabilities are \(P(A=1\mid L=1)=0.80\) and \(P(A=1\mid L=0)=0.20\). Suppose the outcome risks are \(0.30\) and \(0.10\) under \(A=1\), for \(L=1\) and \(L=0\), respectively; under \(A=0\), they are \(0.50\) and \(0.20\). Compute the risk under \(A=1\), then compare it with the observed treated risk.
The g-computation risk is obtained from the outcome model and the baseline distribution:
Among treated people, the covariate distribution is different. The joint probabilities of \(L=1,A=1\) and \(L=0,A=1\) are \((0.50)(0.80)=0.40\) and \((0.50)(0.20)=0.10\), so \(P(A=1)=0.50\), \(P(L=1\mid A=1)=0.40/0.50=0.80\), and \(P(L=0\mid A=1)=0.10/0.50=0.20\). Therefore,
The difference, \(0.26\) versus \(0.20\), arises because the treated group overrepresents \(L=1\), a group with higher outcome risk under treatment. The treatment model explains this selection pattern, but it does not replace the conditional outcome model needed to calculate the intervention mean.
When Treatment Probabilities Still Matter
Although assignment probabilities are absent from the g-formula, they remain relevant to the analysis in several ways. First, sequential exchangeability is a causal assumption about treatment selection given measured history. A fitted treatment model may help describe that selection, but good prediction or calibration does not prove that all confounders were measured. Second, positivity concerns whether the regime-prescribed treatment occurs with positive probability at relevant histories. Near-zero probabilities signal that the outcome or transition models may be forced to extrapolate. Third, treatment probabilities are central to inverse-probability weighting, where observed records are reweighted to represent a target intervention. That is a different estimating strategy from g-computation, not an extra factor to append to its formula.
| Question | G-computation role | Assignment-model role |
|---|---|---|
| What happens to covariates under the regime? | Model the conditional covariate transitions under assigned treatment values. | Not a transition model; describes observed treatment selection. |
| What is the outcome under the regime? | Model the conditional outcome given covariate and treatment history. | Does not provide the required outcome regression by itself. |
| Are relevant treatment histories supported? | Required for credible estimation and interpretation. | Probabilities can help diagnose sparse or poorly supported histories. |
| How does inverse-probability weighting work? | Not the weighting factor in this approach. | Treatment probabilities are used to construct weights. |
The main practical limitation is therefore not that g-computation ignores treatment selection, but that it relies on correctly estimated outcome and covariate-transition distributions at regime-relevant histories. Extrapolation can be severe when the data contain little support for those histories. A treatment model can help reveal weak support, but cannot turn unsupported histories into observed information. Nor does fitting every conditional model guarantee validity: causal identification assumptions and model adequacy remain necessary.
Common Mistake: Multiplying by the Propensity Score
A common error is to take the g-formula and multiply each term by \(P(A_t=d_t(C_t)\mid C_t)\), reasoning that the probability of observing the regime must be part of its counterfactual mean. That inserts the observational assignment mechanism into a distribution where treatment has already been set by intervention. It would generally downweight histories precisely because the observed assignment process made the intervention uncommon, changing the target quantity. In inverse-probability weighting, treatment probabilities appear for a different reason: weights reweight observed treatment histories. Keep the two constructions distinct.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In one sentence, distinguish the treatment-assignment mechanism from the treatment rule under a deterministic intervention.
- Suppose a baseline covariate has probability \(0.25\) of being high risk. Under a fixed treatment, outcome risks are \(0.40\) for high risk and \(0.12\) for low risk. What is the g-computation risk?
- Does a fitted treatment model establish sequential exchangeability? Explain.
- Why can very small treatment probabilities matter even though they do not appear in the g-formula?
- Which model is needed to predict the distribution of an intermediate covariate under a specified treatment history?
Solutions. (1) The assignment mechanism gives the probability of observed treatment conditional on history; the intervention rule fixes treatment as a function of history. (2) \(0.25(0.40)+0.75(0.12)=0.10+0.09=0.19\). (3) No. A model describes observed assignment conditional on measured history; it cannot verify that all confounders were measured or that the causal assumption holds. (4) They indicate that the regime may have little support at those histories, so conditional models may rely on extrapolation. (5) The conditional covariate-transition model \(q_t\), evaluated at the regime-prescribed treatment history.