Tutorials › Propensity Score Matching and Instrumental Variables › TMLE for Continuous Outcomes

Doubly Robust Estimation · Tutorial 317 of 699

TMLE for Continuous Outcomes

Implement continuous-outcome ATE TMLE by updating each treatment-specific regression and checking the resulting targeting equations.

Advanced 11 min read

What You'll Learn

  • Define the treatment-specific regression and propensity score used in continuous-outcome TMLE.
  • Derive the least-squares fluctuation and its two weighted residual equations.
  • Calculate targeted means and an ATE from fitted outcome and propensity values.
  • Check positivity, fluctuation-matrix rank, and the empirical targeting equations.
  • Distinguish separate treatment-specific targeting from a one-dimensional ATE fluctuation.
  • Recognize what targeting can and cannot repair when nuisance models are poor.

Why Targeting a Continuous Outcome Requires a Suitable Update

For a continuous outcome, an estimator based on an outcome regression can be adjusted to account for treatment assignment by updating its predictions in directions determined by the propensity score. The update must fit the outcome scale: a linear fluctuation with an identity link is natural for an unbounded continuous outcome. Its coefficients can be found by least squares, and the fitted update can be used to estimate each treatment-specific mean before taking their difference.

This tutorial develops a two-coefficient fluctuation that targets the treated and untreated means separately. The essential check is not that the clever-covariate columns vary within each arm. It is that the fluctuation design matrix has full column rank; in this disjoint-arm design, each column must be nonzero.

Definition: Let \(A\in\{0,1\}\) be treatment, \(W\) the measured baseline covariates, and \(Y\) a continuous outcome. Define \(Q_0(a,w)=E(Y\mid A=a,W=w)\), the propensity score \(g_0(w)=P(A=1\mid W=w)\), and the average treatment effect (ATE) \(\psi_0=E\{Q_0(1,W)-Q_0(0,W)\}\). Their estimates are denoted \(\hat Q(a,w)\) and \(\hat g(w)\). The empirical plug-in ATE after targeting is the average targeted treated prediction minus the average targeted untreated prediction over the observed covariates.

A causal interpretation requires identification assumptions. Consistency means that the observed outcome equals the outcome under the treatment actually received. Conditional exchangeability requires \(Y(a)\) to be independent of \(A\) given \(W\), for \(a=0,1\); in words, the measured covariates suffice to control confounding. Positivity requires \(0<g_0(W)<1\) in the target population. The usual no-interference condition rules out one person's treatment changing another person's outcome. The data are taken to be independent observations here; dependence requires an appropriate design and inference procedure.

The fluctuation itself also has conditions. The estimated propensity scores used in its covariates must be strictly between zero and one, and the observed-data fluctuation design matrix must have full column rank. For least squares, the outcome residuals must have finite second moments. A Gaussian working loss is one way to motivate squared error, but the outcomes need not actually be normally distributed for the algebraic targeting equations below.

The Arm-Specific Linear Fluctuation

Start with the outcome regression evaluated at the observed treatment, \(\hat Q(A_i,W_i)\). Define the two clever covariates

$$ H_1(A_i,W_i)=\frac{A_i}{\hat g(W_i)},\qquad H_0(A_i,W_i)=\frac{1-A_i}{1-\hat g(W_i)}. $$

The subscripts refer to the treatment arm whose outcome regression is updated. The linear fluctuation with an identity link is

$$ \hat Q_{\boldsymbol\epsilon}(A_i,W_i) =\hat Q(A_i,W_i)+\epsilon_1 H_1(A_i,W_i)+\epsilon_0 H_0(A_i,W_i). $$

Because the covariates are disjoint, a treated observation has \(H_0=0\), while an untreated observation has \(H_1=0\). Estimate the two coefficients by minimizing the empirical squared loss. There is no intercept: the initial regression is an offset, and the update is constrained to the specified clever-covariate directions.

$$ L(\epsilon_1,\epsilon_0)=\frac{1}{2n}\sum_{i=1}^n \left\{Y_i-\hat Q(A_i,W_i)-\epsilon_1H_1(A_i,W_i)-\epsilon_0H_0(A_i,W_i)\right\}^2. $$

Differentiating the loss with respect to each coefficient gives the targeting equations. Write the fitted residual as \(R_i^*=Y_i-\hat Q_{\boldsymbol\epsilon}(A_i,W_i)\). At a least-squares minimizer,

$$ \frac{1}{n}\sum_{i=1}^n H_1(A_i,W_i)R_i^*=0, \qquad \frac{1}{n}\sum_{i=1}^n H_0(A_i,W_i)R_i^*=0. $$

Since the columns are disjoint, each coefficient has a simple closed form. For \(j\in\{0,1\}\), the formula uses only observations in arm \(j\):

$$ \hat\epsilon_j= \frac{\sum_{i=1}^n H_j(A_i,W_i)\{Y_i-\hat Q(A_i,W_i)\}} {\sum_{i=1}^n H_j(A_i,W_i)^2}. $$

This calculation is defined only if the denominator is positive for each coefficient being estimated. More generally, the least-squares design matrix must have full column rank. In this particular design, \(H_1\) is nonzero only for treated observations and \(H_0\) only for untreated observations. Thus each column is nonzero if its arm is observed and its propensity values are finite. A column does not need to vary within its arm: a constant, nonzero column identifies its coefficient.

Targeted Means and the ATE

For each covariate value \(w\), evaluate the fitted fluctuation at the treatment level of interest. The targeted treatment-specific predictions are

$$ \hat Q^*(1,w)=\hat Q(1,w)+\frac{\hat\epsilon_1}{\hat g(w)},\qquad \hat Q^*(0,w)=\hat Q(0,w)+\frac{\hat\epsilon_0}{1-\hat g(w)}. $$

The empirical targeted means average these predictions over all observed covariate values, not only over people who received the corresponding treatment. Their difference estimates the ATE:

$$ \hat\psi_{\mathrm{TMLE}}= \frac{1}{n}\sum_{i=1}^n \{\hat Q^*(1,W_i)-\hat Q^*(0,W_i)\}. $$

The reason this update is targeted can be seen from the efficient influence function for the ATE, with nuisance functions \(Q\) and \(g\):

$$ D(O;Q,g,\psi)= \frac{A}{g(W)}\{Y-Q(1,W)\} -\frac{1-A}{1-g(W)}\{Y-Q(0,W)\} +Q(1,W)-Q(0,W)-\psi. $$

The first two terms are the treated and untreated weighted residual contributions. The arm-specific targeting equations set their empirical averages to zero at the updated regression. With \(\hat\psi_{\mathrm{TMLE}}\) defined as the empirical mean of the updated contrast, the empirical mean of the full influence-function expression is therefore zero. This is the link between the targeting equation and the ATE plug-in estimate.

A short derivation also explains why the method can be doubly robust under regularity conditions. In the population, if \(g=g_0\), then for any suitable \(Q\),

$$ E\left[\frac{A}{g_0(W)}\{Y-Q(1,W)\}\right] =E\{Q_0(1,W)-Q(1,W)\}, $$

and the corresponding untreated weighted residual expectation is \(E\{Q_0(0,W)-Q(0,W)\}\). Consequently, adding the two weighted residual corrections to the regression contrast recovers \(E\{Q_0(1,W)-Q_0(0,W)\}\). If instead \(Q=Q_0\), both residual expectations are zero even when \(g\) is misspecified. Targeting does not guarantee consistency if both nuisance estimates are poor, nor does it replace the identification assumptions. Flexible nuisance fitting, cross-fitting, and valid inference still require their own conditions.

Worked Example: Constant Clever Covariates Still Identify the Update

Consider four hypothetical observations with \(\hat g(W_i)=0.5\) for all \(i\). There are two treated and two untreated observations. Suppose the observed outcome residuals \(Y_i-\hat Q(A_i,W_i)\) are \(2,-1\) among the treated and \(-1,3\) among the untreated. Within each arm, the corresponding clever covariate is constantly \(2\).

For the treated coefficient, the numerator is \(2(2)+2(-1)=2\), and the denominator is \(2^2+2^2=8\). Thus \(\hat\epsilon_1=2/8=0.25\). For the untreated coefficient, the numerator is \(2(-1)+2(3)=4\), with the same denominator \(8\), so \(\hat\epsilon_0=4/8=0.5\).

The coefficients are estimable even though neither covariate varies within its arm: each column is nonzero, and the two disjoint columns are linearly independent. To calculate the plug-in estimate, suppose the initial treated predictions across all four covariate values are \(8,9,7,10\), and the initial untreated predictions are \(6,7,8,9\). The treatment predictions each increase by \(0.25/0.5=0.5\), giving a mean of \(9\). The untreated predictions each increase by \(0.5/(1-0.5)=1\), giving a mean of \(8.5\). Therefore \(\hat\psi_{\mathrm{TMLE}}=9-8.5=0.5\) outcome units.

The targeting equations check directly. The updated treated residuals are \(1.5,-1.5\), so their weighted sum is \(2(1.5)+2(-1.5)=0\). The untreated residuals are \(-2,2\), with weighted sum \(2(-2)+2(2)=0\).

Worked Example: Unequal Propensities and the Targeted Contrast

For a second hypothetical data set, consider four observations with treatment assignments \(1,1,0,0\) and estimated propensities \(0.8,0.5,0.2,0.5\), respectively. Let the observed treated residuals be \(2,-1\), and the observed untreated residuals be \(-2,1\). Suppose initial treated predictions across all four covariate values are \(10,12,11,13\), and initial untreated predictions are \(7,8,9,10\).

For treated observations, the clever covariates are \(1/0.8=1.25\) and \(1/0.5=2\). Hence \(\hat\epsilon_1=\{1.25(2)+2(-1)\}/(1.25^2+2^2)=0.5/5.5625\approx0.08989\). For untreated observations, the covariates are \(1/(1-0.2)=1.25\) and \(1/(1-0.5)=2\), giving \(\hat\epsilon_0=\{1.25(-2)+2(1)\}/(1.25^2+2^2)=-0.5/5.5625\approx-0.08989\).

The initial treated mean is \(46/4=11.5\). The mean of \(1/\hat g(W_i)\) over all four observations is \((1.25+2+5+2)/4=2.5625\), so the targeted treated mean is \(11.5+(0.08989)(2.5625)\approx11.7303\). The initial untreated mean is \(34/4=8.5\), and the mean of \(1/\{1-\hat g(W_i)\}\) is \((5+2+1.25+2)/4=2.5625\). The targeted untreated mean is \(8.5+(-0.08989)(2.5625)\approx8.2697\). The estimated ATE is therefore approximately \(11.7303-8.2697=3.4607\) outcome units.

For example, the treated weighted residual sum after the update is \(1.25\{2-(0.08989)(1.25)\}+2\{-1-(0.08989)(2)\}\), which is zero up to rounding. The untreated equation is likewise zero: \(1.25\{-2-(-0.08989)(1.25)\}+2\{1-(-0.08989)(2)\}=0\). The large inverse propensity \(1/0.2=5\) also signals that this estimate may be sensitive to limited overlap.

Alternative Fluctuations, Diagnostics, and Limitations

A common alternative uses one signed clever covariate, \(H=A/\hat g(W)-(1-A)/\{1-\hat g(W)\}\), and one coefficient. Its least-squares update sets the single empirical sum of signed weighted residuals to zero. That is an ATE-oriented targeting equation, but it does not generally set the treated and untreated weighted residual sums to zero separately. The two-coefficient version developed here targets the two treatment-specific regressions separately, then forms their contrast. Neither parameterization removes the need to check overlap, model fit, and estimability.

Useful diagnostics include the range of estimated propensity scores, the largest values of \(1/\hat g(W_i)\) and \(1/\{1-\hat g(W_i)\}\), the numbers in both arms, and the two empirical targeting-equation residuals after fitting. Also check the fluctuation design matrix and the fitted coefficients. Large coefficients or large changes in predictions can indicate poor overlap or an inadequate initial fit; exact satisfaction of the targeting equations alone does not certify that the causal estimate is reliable.

  • Weak overlap: propensities near zero or one produce large clever covariates and can make the estimate unstable. Targeting does not create information for covariate regions with little treatment support.
  • Rank failure: an arm with no observations gives a zero column and leaves its coefficient unidentified. More generally, a rank-deficient fluctuation design cannot identify all coefficients. Do not silently drop an unavailable targeting equation.
  • Wrong fluctuation structure: adding an unconstrained intercept changes the update directions and does not yield the stated two clever-covariate score equations by itself.
  • Overinterpreting the update: an exactly solved empirical equation is an algebraic property of the fit, not evidence that exchangeability, positivity, or the outcome and propensity nuisance estimates are adequate.

For a continuous outcome, the identity-scale update may produce predictions outside a range that is plausible in a particular application. That is not inherently a defect when the outcome is genuinely unbounded, but it can be concerning when the outcome has known bounds; choosing an appropriate link and fluctuation is a separate issue. Compared with outcome regression alone, TMLE adds propensity-based residual correction. Compared with AIPW, it reports an updated plug-in contrast while targeting the corresponding residual equation. Neither approach solves unmeasured confounding or positivity violations.

Key takeaway: Fit the identity-scale fluctuation with the two arm-specific clever covariates, verify full column rank, and calculate the updated predictions for both treatment levels over the full covariate sample. A constant nonzero covariate column is estimable; variation within each arm is not required.

Check Your Understanding

Answer each question, then compare your work with the brief solutions.

  1. If every treated observation has clever covariate value \(3\), does the treated coefficient require covariate variation to be estimable? What condition matters?
  2. For one arm, suppose the clever covariate values are \(1\) and \(2\), and the initial residuals are \(2\) and \(-1\). Calculate the least-squares fluctuation coefficient.
  3. Why are the targeted treated and untreated means each averaged over all observed \(W_i\), rather than only over the corresponding observed treatment arm?
  4. Name two assumptions or conditions that targeting cannot repair.

Solutions. (1) No. A constant column is estimable if it is nonzero; the full fluctuation design must have full column rank. (2) The numerator is \(1(2)+2(-1)=0\), and the denominator is \(1^2+2^2=5\), so the coefficient is \(0/5=0\). (3) The target is the population mean under each treatment over the same target covariate distribution, not the mean within the selected arm. (4) Examples include conditional exchangeability, positivity, and correct or sufficiently accurate nuisance estimation; targeting itself establishes none of them.

Clinical Biostats