Why Residualize Treatment?
At one treatment time, the observed association between treatment and outcome can reflect both a treatment effect and differences in the histories that led people to receive treatment. G-estimation targets the treatment effect by first subtracting that effect from the observed outcome. At the correct effect value, the resulting blip-down outcome should have no systematic relationship with treatment after accounting for the measured history. A treatment residual makes this idea into an estimating equation.
Let \(L\) denote the measured history available just before treatment, \(A\) the treatment, and \(Y\) the outcome measured afterward. For now, take \(A\) to be binary, with values 0 and 1, and suppose larger \(Y\) is measured in meaningful outcome units. This tutorial considers a single, constant additive blip parameter, not a sequence of blips across treatment times.
When \(A=1\), blipping down subtracts \(\psi\) from the observed outcome; when \(A=0\), it leaves the outcome unchanged. The parameter \(\psi\) has the same units as \(Y\). If \(Y\) is a blood-pressure measurement in mmHg, for example, \(\psi\) is measured in mmHg.
Model and Identification Assumptions
Write \(Y(1)\) and \(Y(0)\) for the potential outcomes under treatment and no treatment. Consistency means the observed outcome equals the potential outcome corresponding to the treatment actually received: \(Y=Y(A)\). The additive blip model used here says the conditional mean effect is constant across histories:
This is a model for a conditional mean contrast, not a claim that every individual's outcome changes by exactly \(\psi\). To interpret \(\psi\) causally from observed data, the following conditions are needed.
- Consistency: the observed treatment and outcome correspond to the treatment received and its potential outcome.
- Conditional exchangeability: given \(L\), treatment assignment is independent of the potential outcomes. In notation, \(A\perp\!\!\!\perp\{Y(0),Y(1)\}\mid L\). This requires that the history includes the relevant confounders.
- Positivity: for histories in the target population, \(0<e(L)<1\). Treatment and no treatment must both be possible at those histories.
- Correct blip form: the additive conditional mean effect is represented by the constant \(\psi\). If the mean effect varies with \(L\), this one-parameter model may not describe it.
The treatment probability \(e(L)\) must also be known or estimated adequately for the histories in the data. Exchangeability and positivity are substantive identification conditions; fitting a treatment model does not establish that they hold.
From the Blip-Down Outcome to an Estimating Equation
Under consistency, exchangeability, and the additive blip model, the conditional mean of \(U(\psi)=Y-\psi A\) does not depend on whether \(A=0\) or \(A=1\), once \(L\) is fixed. To see why, exchangeability lets us use the conditional potential-outcome means for either treatment group. Under treatment, the observed mean is \(E\{Y(0)\mid L\}+\psi\); subtracting \(\psi\) gives \(E\{Y(0)\mid L\}\). Under no treatment, the observed mean is already \(E\{Y(0)\mid L\}\).
Because \(E(A-e(L)\mid L)=0\), multiplying the blip-down outcome by the treatment residual has conditional mean zero at the true \(\psi\). Averaging over histories gives the population moment equation:
This equation is the basis for one-time G-estimation. In a sample of size \(n\), use the observed history to obtain \(\hat e_i\), the estimated probability of treatment for individual \(i\), and set \(R_i=A_i-\hat e_i\). The empirical equation is
When \(\sum_i R_iA_i\ne 0\), solving this linear equation gives
The numerator measures the residualized treatment–outcome association, and the denominator scales it by residualized treatment variation. This is a sample solution to an estimating equation, not by itself proof that the assumptions hold or that the estimate is precise.
Worked Examples
Worked Example: Solving the Moment Equation
Suppose a hypothetical sample contains six people. The treatment probabilities below are known for illustration, or are treated as adequately estimated from their pre-treatment histories. The outcome is measured in points.
| Person | \(e(L)\) | \(A\) | \(Y\) (points) | \(R=A-e(L)\) | \(RY\) | \(RA\) |
|---|---|---|---|---|---|---|
| 1 | 0.25 | 1 | 14 | 0.75 | 10.50 | 0.75 |
| 2 | 0.25 | 0 | 8 | -0.25 | -2.00 | 0 |
| 3 | 0.50 | 1 | 13 | 0.50 | 6.50 | 0.50 |
| 4 | 0.50 | 0 | 9 | -0.50 | -4.50 | 0 |
| 5 | 0.75 | 1 | 16 | 0.25 | 4.00 | 0.25 |
| 6 | 0.75 | 0 | 10 | -0.75 | -7.50 | 0 |
For example, person 1 has \(R=1-0.25=0.75\), so that person's contributions are \(RY=0.75(14)=10.50\) and \(RA=0.75(1)=0.75\). Summing the table gives \(\sum RY=7.00\) and \(\sum RA=1.50\). Therefore,
The estimated additive mean blip is 4.667 points per treatment, under the stated causal and model assumptions. The small hypothetical sample is for arithmetic illustration; the calculation alone does not assess uncertainty or validate those assumptions.
Worked Example: Why the Crude Contrast Can Differ
Consider eight hypothetical people in two pre-treatment history groups. In the first group, the treatment probability is 0.25; in the second, it is 0.75. The outcomes are points. These probabilities match the treatment proportions in the groups, as would occur with a saturated treatment model for this two-group history.
| History group | \(A\) | \(Y\) | \(e(L)\) | \(R\) | \(RY\) | \(RA\) |
|---|---|---|---|---|---|---|
| 1 | 1 | 15 | 0.25 | 0.75 | 11.25 | 0.75 |
| 1 | 0 | 5 | 0.25 | -0.25 | -1.25 | 0 |
| 1 | 0 | 7 | 0.25 | -0.25 | -1.75 | 0 |
| 1 | 0 | 9 | 0.25 | -0.25 | -2.25 | 0 |
| 2 | 1 | 25 | 0.75 | 0.25 | 6.25 | 0.25 |
| 2 | 1 | 27 | 0.75 | 0.25 | 6.75 | 0.25 |
| 2 | 1 | 29 | 0.75 | 0.25 | 7.25 | 0.25 |
| 2 | 0 | 17 | 0.75 | -0.75 | -12.75 | 0 |
In group 1, the contributions sum to \(\sum RY=6.00\) and \(\sum RA=0.75\). In group 2, they sum to \(\sum RY=7.50\) and \(\sum RA=0.75\). Thus the full estimate is
The crude difference in observed means is \(24.00-9.50=14.50\) points: the treated mean is \((15+25+27+29)/4=24.00\), and the untreated mean is \((5+7+9+17)/4=9.50\). The crude contrast mixes treatment differences with the different distribution of history groups among treated and untreated people. The residualized calculation uses treatment variation relative to the group's treatment probability. A causal interpretation of 9.00 still requires exchangeability and the additive blip model; the calculation cannot guarantee either one.
Worked Example: Randomized Treatment and a Binary Outcome
In a hypothetical randomized experiment, eight people have a binary outcome indicating whether an event occurred. Four are assigned treatment and four control, so \(e(L)=0.50\) for everyone. Three of the four treated people and one of the four controls have an event. Assume consistency, successful randomization, and a constant additive effect on the mean of this binary outcome.
For treated people, \(R=1-0.50=0.50\); for controls, \(R=0-0.50=-0.50\). The sum of \(RY\) is \(0.50(3)-0.50(1)=1.00\). The sum of \(RA\) is \(0.50(4)+(-0.50)(0)=2.00\). Therefore,
Here the estimate is 0.50, or 50 percentage points on the event-probability scale. It equals the observed risk difference, \(3/4-1/4=0.50\), because treatment is randomized with a common probability. The outcome values are dimensionless indicators, while their mean contrast is a difference in probabilities.
Interpretation, Limits, and a Common Mistake
The one-time estimator is useful because it expresses causal effect estimation through a treatment mechanism and a blip-down outcome rather than treating the crude outcome contrast as the target. In observational data, the history \(L\) must be rich enough to make conditional exchangeability plausible. In randomized data, assignment can support exchangeability by design, although the treatment probability and the target population still need to be understood.
The denominator \(\sum_i R_iA_i\) reflects the available treatment variation after accounting for history. If everyone has the same treatment status within each history, the relevant residualized variation can be absent, and the equation may not determine a unique parameter. Probabilities near 0 or 1 also mean little overlap at those histories, which can make estimation fragile. Positivity is therefore not merely a technical condition: it concerns whether the data contain comparisons that can inform the blip.
Common mistake: “The estimated treatment effect is the treated mean minus the untreated mean, so residualizing treatment is unnecessary.” That reasoning ignores that people with different histories may have different treatment probabilities and different expected outcomes. The correction is to use \(R_i=A_i-\hat e_i\) in the moment equation, and then to interpret its solution causally only if exchangeability, positivity, consistency, and the additive blip model are defensible. Residualization addresses the specified history; it does not remove bias from unmeasured confounding or repair a misspecified effect model.
Check Your Understanding
Use the assumptions and estimating equation above to answer the following.
- In words, what does the residual \(A-e(L)\) represent?
- Why does the blip-down outcome \(Y-\psi A\) have a conditional mean that does not vary with treatment at the true \(\psi\), under the stated model and assumptions?
- If \(\sum_i R_iY_i=12\) and \(\sum_i R_iA_i=3\), what is the G-estimate, and what are its units relative to \(Y\)?
- Why can the crude difference in observed outcome means differ from the one-time G-estimate in observational data?
- What does it mean for the empirical estimating equation if \(\sum_i R_iA_i=0\)?