From Initial Fits to a Targeted ATE
For a binary treatment and binary outcome, TMLE turns initial estimates of the treatment mechanism and outcome regression into an estimate of the average treatment effect (ATE). The calculation has a useful discipline: first fit the nuisance quantities, then update the outcome predictions using the observed outcomes, and finally average the updated predictions under treatment and control. The update is designed to satisfy an empirical estimating equation; it is not an arbitrary adjustment to make predicted outcomes look plausible.
This tutorial works through that calculation for a small, hypothetical dataset. The arithmetic is deliberately explicit: a plausible-looking fluctuation coefficient is not enough. The fitted predictions must also satisfy the targeting equation, and the ATE must use predictions under both treatment levels for every individual.
The causal interpretation requires consistency, conditional exchangeability \(Y(a)\perp A\mid W\), and positivity: \(0<P(A=1\mid W)<1\) for covariate values in the target population. The observations are assumed independent for the simple calculation here. These are assumptions about the data-generating process, not facts established by fitting the models. In practice, estimated propensities very near zero or one can make the clever covariate large and the update unstable.
The Logistic Targeting Step
For each observed individual, the initial fitted probability is \(\bar Q(A_i,W_i)\). The fluctuation model treats its logit as an offset and estimates one coefficient, \(\epsilon\), on the clever covariate:
There is no additional intercept in this fluctuation. For the Bernoulli log-likelihood, differentiating with respect to \(\epsilon\) gives the score \(\sum_i H(A_i,W_i)\{Y_i-\bar Q_\epsilon(A_i,W_i)\}\). When the fluctuation likelihood has a finite interior maximum (equivalently, a finite score root), the fitted coefficient solves the empirical targeting equation:
After estimating \(\epsilon\), apply the same coefficient to each individual’s predictions under both possible treatment levels. In particular, the relevant covariate for a counterfactual prediction is \(H(a,W_i)=a/g(W_i)-(1-a)/(1-g(W_i))\), not necessarily the clever covariate for the treatment actually received.
Worked Example: A Four-Observation Binary-Outcome TMLE
Consider four hypothetical individuals with one covariate pattern each. The initial fits and observed data are shown below. The initial outcome predictions under the received treatment are specified with enough precision to check the numerical update; the other-treatment predictions are 0.3000. The table rounds the propensity score and initial predictions for readability.
| Individual | \(A_i\) | \(Y_i\) | \(g(W_i)\) | \(\bar Q(1,W_i)\) | \(\bar Q(0,W_i)\) | Initial prediction observed |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0.2500 | 0.4220 | 0.3000 | 0.4220 |
| 2 | 0 | 0 | 0.5000 | 0.3000 | 0.2500 | 0.2500 |
| 3 | 1 | 0 | 0.1269 | 0.1168 | 0.3000 | 0.1168 |
| 4 | 0 | 0 | 0.5000 | 0.3000 | 0.2500 | 0.2500 |
For a transparent numerical check, the initial predictions were constructed so that at \(\epsilon=0.15729\), the observed-treatment predictions are approximately \(0.57806,\ 0.19570,\ 0.31350,\ 0.19570\). For example, individual 1 has \(H_1=1/0.25=4\), so its initial logit is chosen as \(\operatorname{logit}(0.57806)-4(0.15729)\), giving an initial probability of about 0.4220. Individuals 2 and 4 have \(H=-2\); individual 3 has \(H\) approximately \(1/0.1269=7.8802\). Their initial logits are set the same way, subtracting \(\epsilon H_i\) from the target logit.
The score equation can be checked directly. With outcomes \(1,0,0,0\), the four terms are approximately \(4(1-0.57806)\), \((-2)(0-0.19570)\), \(7.8802(0-0.31350)\), and \((-2)(0-0.19570)\). Their sum is \(1.68776+0.39140-2.47045+0.39140\approx0.00011\), up to rounding. A numerical solution is therefore \(\hat\epsilon\approx0.15729\), which rounds to \(0.1573\). The corresponding first prediction rounds to 0.5781 at four decimal places; the other three round to 0.1957, 0.3135, and 0.1957. Keeping extra digits in the score check avoids mistaking rounding differences for a failure of the equation.
Now predict each individual’s outcome under both treatment levels. For individual 1, \(H(0,W_1)=-1/(1-0.25)=-1.3333\), so the targeted control prediction is \(\operatorname{expit}\{\operatorname{logit}(0.3000)-1.3333(0.15729)\}\approx0.2579\). Its targeted treatment prediction is 0.57806. For individual 2, \(H(1,W_2)=2\), giving a targeted treatment prediction \(\operatorname{expit}\{\operatorname{logit}(0.3000)+2(0.15729)\}\approx0.3699\); its targeted control prediction is 0.19570. Individual 4 has the same two predictions. For individual 3, \(H(0,W_3)=-1/(1-0.1269)\approx-1.1453\), giving a targeted control prediction of about 0.2636; its targeted treatment prediction is 0.31350.
The plug-in ATE is the average of the four treatment-control contrasts: \((0.57806-0.2579+0.3699-0.19570+0.31350-0.2636+0.3699-0.19570)/4\approx0.1796\). Thus the estimated average treatment effect is about 0.180, or 18.0 percentage points in the outcome probability scale. It is not the average of the observed outcomes, nor is it obtained by comparing only the treated and control individuals.
Worked Example: A Symmetric Fluctuation With an Exact Root
Suppose four hypothetical individuals have \(g(W_i)=0.5\), initial outcome predictions of 0.5 under both treatment levels, and observed pairs \((A_i,Y_i)=(1,1),(1,0),(0,0),(0,0)\). The clever covariates are \(2,2,-2,-2\). Let \(q_T=\operatorname{expit}(2\epsilon)\) and \(q_C=\operatorname{expit}(-2\epsilon)=1-q_T\). The targeting score is \(2(1-q_T)+2(0-q_T)-2(0-q_C)-2(0-q_C)=6-8q_T\). Setting it to zero gives \(q_T=6/8=0.75\), so \(2\hat\epsilon=\operatorname{logit}(0.75)=\log(3)\) and \(\hat\epsilon=0.5493\). Then \(q_C=0.25\), and the plug-in ATE is \(0.75-0.25=0.5000\), or 50 percentage points. Substituting back gives score \(6-8(0.75)=0\), confirming the update.
Worked Example: Checking One Record’s Update
For a treated individual with \(g(W)=0.20\), \(Y=1\), and initial treated prediction \(\bar Q(1,W)=0.4000\), the clever covariate is \(H=1/0.20=5\). If a fitted fluctuation coefficient is \(\epsilon=0.1000\), then \(\bar Q^*=\operatorname{expit}\{\operatorname{logit}(0.4000)+0.1000(5)\} =\operatorname{expit}(-0.4055+0.5000)\approx0.5236\). This record contributes \(5(1-0.5236)=2.382\) to the empirical score. That contribution is not supposed to be zero by itself: the fitted coefficient makes the sum of contributions across the sample zero. A large contribution can signal that this observation has substantial influence on the targeting step.
Checks, Alternatives, and Limitations
A practical hand calculation should check the following before interpreting the ATE:
- Propensity range: every fitted \(g(W_i)\) must be strictly between zero and one. Values near the boundaries create large clever covariates and can make the update sensitive to a few observations.
- Targeting equation: recompute each \(H_i(Y_i-\bar Q^*_i)\) using unrounded predictions, then sum. A materially nonzero sum suggests a wrong sign, an incorrect coefficient, or a numerical fitting problem.
- Both intervention predictions: calculate \(\bar Q^*(1,W_i)\) and \(\bar Q^*(0,W_i)\) for every individual. Using observed-treatment predictions alone does not produce the plug-in ATE.
- Probability scale: the logistic update keeps predictions between zero and one, but that fact does not guarantee adequate overlap, correct nuisance estimation, or a credible causal interpretation.
G-computation estimates the ATE by averaging predictions from an outcome model under each treatment level, without this targeting step. AIPW combines outcome predictions and propensity-weighted residuals. TMLE also uses both nuisance fits, but its fluctuation updates the outcome regression and preserves the probability scale for binary outcomes. In finite samples, TMLE and AIPW need not give identical estimates. Neither the targeting equation nor the bounded predictions repair unmeasured confounding, severe positivity violations, or poor nuisance fits. Their large-sample guarantees require the relevant identification and regularity conditions; double robustness is not a promise of good performance in every small sample.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- If \(g(W)=0.25\) and \(A=1\), what is \(H(A,W)\)?
- In the symmetric worked example, what score value results from using \(q_T=0.70\) and \(q_C=0.30\)?
- Why must the plug-in ATE use both \(\bar Q^*(1,W_i)\) and \(\bar Q^*(0,W_i)\) for each individual?
- Does a zero empirical targeting score establish conditional exchangeability? Explain.
Solutions. (1) \(H=1/0.25=4\). (2) The score is \(6-8(0.70)=0.4000\), so this is not the fitted root. (3) The ATE is the sample average of each individual’s predicted treatment outcome minus predicted control outcome; observed-treatment predictions alone do not supply both terms. (4) No. The zero score is an empirical property of the fitted fluctuation, while exchangeability is an untestable causal identification assumption about treatment assignment and potential outcomes conditional on \(W\).