Tutorials › Causal Inference › Doubly Robust Estimation with Sampling Weights

Transportability and Generalizability · Tutorial 933 of 972

Doubly Robust Estimation with Sampling Weights

Learn how outcome regression and inverse odds of sampling weights combine to estimate a target-population effect, and what “doubly robust” does—and does not—guarantee.

Advanced 11 min read

What You'll Learn

  • Define the target-population average treatment effect and the source-to-target density ratio.
  • State the causal, sampling, positivity, and treatment-adjustment conditions for the estimator.
  • Derive the augmented estimator from target standardization and a weighted residual correction.
  • Explain robustness to misspecification of either the outcome model or the sampling model.
  • Calculate transported treatment-specific means and effects using hypothetical data.
  • Identify why double robustness does not protect against an incorrect treatment model or violations of identification assumptions.

Why Combine Standardization and Sampling Weights?

Transporting a causal effect requires both a causal comparison and a population adjustment. Outcome-model standardization predicts treatment-specific outcomes across the target population’s covariate distribution. Inverse odds of sampling weights instead reweight source-population observations to represent that target. Each approach depends on a model: the first on an outcome model, the second on a sampling model. A doubly robust estimator combines them so that, under the conditions below, it can remain consistent when either one of those two models is correct.

The residual correction is central to the combination. Starting with predictions for the target population, it adds a weighted average of the source data’s prediction errors. If the outcome model is correct, those errors average to zero in the relevant groups. If the sampling model is correct, the weighted errors correct a misspecified outcome model, provided treatment adjustment is also valid.

Estimand, Notation, and Identification Conditions

Definition: Let \(S=1\) indicate membership in the source study and \(S=0\) membership in the target population. Let \(A\in\{0,1\}\) be treatment, \(X\) the measured covariates, and \(Y(a)\) the outcome that would be observed under treatment \(a\). The target-population average treatment effect is $$ \psi_T=E[Y(1)-Y(0)\mid S=0]=\mu_1^T-\mu_0^T, $$ where \(\mu_a^T=E[Y(a)\mid S=0]\) is the target-population mean outcome under treatment \(a\).

A standard identification argument requires consistency, no interference, adequate covariate measurement, and the following conditional exchangeability conditions. Within the source study, treatment assignment must be exchangeable given \(X\): \(Y(a)\perp A\mid X,S=1\). Conditional on \(X\), source participation must not distinguish the potential outcomes from those in the target: \(Y(a)\perp S\mid X\). The first condition permits treatment-specific outcome means to be learned in the source; the second permits those means to apply to the target.

There must also be positivity: the target covariate patterns must be represented in the source, and each treatment level must have positive probability at relevant source covariate values. In notation, the source-to-target density ratio must be defined where the target covariate density is positive, and \(0<e_a(x)<1\), where \(e_a(x)=P(A=a\mid X=x,S=1)\). In a randomized source study, \(e_a(x)\) is known from the randomization scheme. In an observational source study, it must be estimated or otherwise adjusted for correctly for the argument here.

Define the source outcome regression \(m_a(x)=E[Y\mid A=a,X=x,S=1]\), and let \(r(x)=f_T(x)/f_S(x)\) be the ratio of target to source covariate densities. Equivalently, if \(\pi(x)=P(S=1\mid X=x)\) is defined under a population mixture with source proportion \(P(S=1)\), then \(r(x)=\{P(S=1)/P(S=0)\}\{1-\pi(x)\}/\pi(x)\). The sampling odds alone give the ratio only up to this population-proportion factor. With separately assembled source and target samples, the relevant factor must correspond to their sampling design or be obtained by directly estimating the density ratio.

The Doubly Robust Estimator

Suppose the data include \(n_T\) target covariate observations and \(n_S\) source observations with \(X,A,Y\). Let \(\hat m_a\), \(\hat r\), and \(\hat e_a\) denote estimated outcome, density-ratio, and treatment-probability functions. The estimator of each target treatment-specific mean is

$$ \hat\mu_a^T= \frac{1}{n_T}\sum_{i:S_i=0}\hat m_a(X_i) + \frac{1}{n_S}\sum_{i:S_i=1} \hat r(X_i)\frac{I(A_i=a)}{\hat e_a(X_i)} \{Y_i-\hat m_a(X_i)\}. $$

The first term averages predicted outcomes over target covariates. The second term averages source residuals, giving greater influence to source covariate patterns that represent the target and correcting for the probability of receiving treatment \(a\). The estimated target effect is \(\hat\psi_T=\hat\mu_1^T-\hat\mu_0^T\). The formula uses the target and source empirical means separately; the density ratio \(r\) is defined as a ratio of covariate densities, not as an unscaled sampling odds.

This is an augmented inverse-probability weighted estimator for transport. Its double robustness refers specifically to the outcome regression and the source-to-target density ratio, conditional on valid treatment adjustment. If treatment is not randomized, a misspecified treatment-probability model can invalidate the residual correction; robustness to the other two models does not repair that problem.

Why the Two Robustness Claims Hold

The argument is clearest at the population level. Replace the estimated functions in the estimator by candidate functions \(\tilde m_a(x)\), \(\tilde r(x)\), and the correct \(e_a(x)\). The target prediction term has expectation \(E_T[\tilde m_a(X)]\). For the correction term, conditioning on \(X\) in the source gives

$$ E_S\left[\tilde r(X)\frac{I(A=a)}{e_a(X)} \{Y-\tilde m_a(X)\}\right] = E_S\left[\tilde r(X)\{m_a(X)-\tilde m_a(X)\}\right]. $$

This equality follows because, given \(X\), the probability of \(A=a\) is \(e_a(X)\), and the conditional outcome mean in that arm is \(m_a(X)\). The treatment-probability factor cancels the probability of entering that arm. The remaining difference is the outcome-model error, weighted by the candidate density ratio.

If \(\tilde m_a=m_a\), the difference is zero for every \(X\), so the residual correction has expectation zero regardless of whether \(\tilde r\) is correct. The expected estimator is then \(E_T[m_a(X)]=\mu_a^T\). Conversely, if \(\tilde r=r=f_T/f_S\), change of density yields

$$ E_S[r(X)\{m_a(X)-\tilde m_a(X)\}] = E_T[m_a(X)-\tilde m_a(X)]. $$

Adding the target prediction term \(E_T[\tilde m_a(X)]\) gives \(E_T[m_a(X)]=\mu_a^T\), even if the outcome model is wrong. This proves the two population-level robustness claims for each treatment-specific mean; subtracting the two means gives the corresponding result for the target average treatment effect.

These are consistency properties, not a promise that a finite-sample estimate will be exact. They require the identification conditions and correct treatment adjustment stated above. If both the outcome model and the sampling model are misspecified, the correction need not remove the outcome-model error.

Worked Example: Combining Target Predictions and Residual Corrections

Consider a hypothetical randomized source study with \(n_S=8\) observations: two observations in each combination of \(X\in\{0,1\}\) and \(A\in\{0,1\}\). The treatment probability is \(e_0(x)=e_1(x)=0.5\). The source has equal proportions with \(X=0\) and \(X=1\), while the target proportions are 0.6 and 0.4. Thus the density ratios are \(r(0)=0.6/0.5=1.2\) and \(r(1)=0.4/0.5=0.8\). Suppose the source outcomes and model predictions are as follows; “residual sum” is the sum of the two observed outcomes minus their predicted values in that cell.

\(X\)\(A\)Two hypothetical outcomes\(m_A(X)\)Residual sum
018, 1082
1115, 1717-2
004, 66-2
109, 1184

For treatment \(a=1\), standardization gives \(0.6(8)+0.4(17)=11.6\). The source residual correction is \((1.2)(1/0.5)(2)+(0.8)(1/0.5)(-2)=4.8-3.2=1.6\), divided by \(n_S=8\), or \(0.2\). Therefore \(\hat\mu_1^T=11.6+0.2=11.8\).

For treatment \(a=0\), the target prediction is \(0.6(6)+0.4(8)=6.8\). The correction is \((1.2)(1/0.5)(-2)+(0.8)(1/0.5)(4)=-4.8+6.4=1.6\), again divided by 8, or \(0.2\). Thus \(\hat\mu_0^T=6.8+0.2=7.0\), and the estimated target effect is \(11.8-7.0=4.8\) outcome units. The example shows the mechanics of the calculation; it does not establish that either fitted model is correct.

Worked Example: Correct Outcome Model, Incorrect Sampling Model

Suppose a hypothetical source study is randomized and has two observations in each \(X,A\) cell. The target has \(P_T(X=0)=0.7\) and \(P_T(X=1)=0.3\). Assume the fitted outcome model gives the correct conditional means: \(m_1(0)=12\), \(m_1(1)=20\), \(m_0(0)=7\), and \(m_0(1)=11\). For illustration, suppose the two outcomes in each cell are one unit below and one unit above the stated mean, so every cell’s residual sum is zero. Let the estimated sampling ratios be wrong: \(\hat r(0)=0.4\) and \(\hat r(1)=1.6\). The treatment probabilities are correctly known as 0.5.

The target prediction for treatment 1 is \(0.7(12)+0.3(20)=14.4\); for treatment 0 it is \(0.7(7)+0.3(11)=8.2\). Each residual correction is zero because each within-cell residual sum is zero, regardless of the incorrect sampling ratios. The resulting target effect is \(14.4-8.2=6.2\) outcome units. In repeated samples, correct conditional outcome means make the residual correction have expectation zero, even when the sampling model is wrong; random finite-sample residuals need not sum exactly to zero.

Worked Example: Correct Sampling Model, Incorrect Outcome Model

Now suppose the hypothetical target distribution is \(P_T(X=0)=0.75\), \(P_T(X=1)=0.25\), and the source distribution is 0.5 in each stratum. The correct density ratios are therefore \(r(0)=1.5\) and \(r(1)=0.5\). The randomized source treatment probabilities are 0.5. In two source observations per \(X,A\) cell, let outcomes be 10 and 10 for \(X=0,A=1\), 18 and 18 for \(X=1,A=1\), 4 and 4 for \(X=0,A=0\), and 8 and 8 for \(X=1,A=0\). Use deliberately incorrect predictions \(m_1(0)=9\), \(m_1(1)=15\), \(m_0(0)=5\), and \(m_0(1)=10\).

For treatment 1, the target prediction is \(0.75(9)+0.25(15)=10.5\). The weighted residual sum before division by \(n_S\) is \((1.5)(2)(2)+(0.5)(2)(6)=6+6=12\): the first residual sum is \(10-9+10-9=2\), and the second is \(18-15+18-15=6\). The correction is \(12/8=1.5\), so \(\hat\mu_1^T=12.0\).

For treatment 0, the target prediction is \(0.75(5)+0.25(10)=6.25\). The weighted residual sum is \((1.5)(2)(-2)+(0.5)(2)(-4)=-6-4=-10\), giving a correction of \(-10/8=-1.25\). Hence \(\hat\mu_0^T=6.25-1.25=5.0\), and the target effect is \(12.0-5.0=7.0\) outcome units. Here the residual correction repairs the deliberately incorrect outcome predictions because the density ratio and treatment probabilities are correct.

Practical Interpretation and a Common Pitfall

In implementation, the outcome regression, sampling model, and—when treatment is not randomized—treatment model must be fitted with the study design in mind. The sampling model estimates how source and target covariate distributions differ; it does not by itself adjust the source treatment comparison. Conversely, outcome standardization alone relies on the conditional outcome model to extrapolate treatment-specific means. The augmented estimator uses both pieces, but the gain is protection against one of two nuisance-model errors, not protection against failures of identification.

A common mistake is to call the estimator “doubly robust” and conclude that it remains valid if any two of the three models are wrong, or that a correct sampling model alone is sufficient in an observational study. That reasoning overlooks the treatment adjustment in the residual term. The correction’s derivation used the correct \(e_a(X)\) to cancel treatment assignment probabilities. If that factor is wrong, the displayed expectation identity does not generally hold. In a randomized study, known assignment probabilities supply this condition; in an observational study, it must be justified and estimated appropriately.

Another practical issue is extreme weights. Very large density ratios or very small treatment probabilities can make estimates unstable even when the formal positivity condition holds. This is a finite-sample warning: double robustness does not guarantee precision. Standard errors and intervals should reflect estimation of the nuisance models and the use of both source and target samples, rather than treating fitted weights and predictions as fixed.

Key takeaway: The estimator equals a target-population average of outcome predictions plus an inverse-probability-weighted source residual correction. With valid treatment adjustment and the transport identification assumptions, it is consistent if the outcome regression is correct or if the source-to-target density ratio is correct. It is not protected when both are wrong, or when treatment adjustment or identification assumptions fail.

Check Your Understanding

Answer each question by referring to the estimator and conditions defined above.

  1. What does the density ratio \(r(x)\) compare, and why is an unscaled sampling odds generally not the ratio of target to source covariate densities?
  2. In the estimator for \(\mu_a^T\), what role does the target prediction term play, and what does the weighted residual correction add?
  3. Why does a correct outcome regression make the population residual correction have expectation zero even if the sampling model is incorrect?
  4. Suppose the sampling ratio is correct but the outcome regression is misspecified. Which change-of-density identity shows how the residual correction recovers the target mean?
  5. Why does double robustness not protect an observational-study estimate when the treatment-probability model is misspecified?
Clinical Biostats