Tutorials › Propensity Score Matching and Instrumental Variables › A Doubly Robust Analysis Of A Matched Cohort

Worked Examples · Tutorial 686 of 699

A Doubly Robust Analysis Of A Matched Cohort

Learn to calculate and diagnose a doubly robust treatment-effect estimate in a matched observational cohort, and understand what its assumptions do—and do not—guarantee.

Intermediate 12 min read

What You'll Learn

  • Define the average treatment effect for the retained matched cohort.
  • Fit and interpret treatment and outcome models for an augmented estimator.
  • Calculate an augmented inverse-probability-weighted estimate from model predictions.
  • Check covariate balance, propensity-score overlap, and influential weights.
  • Explain the two alternative model-correctness conditions behind double robustness.
  • Distinguish a doubly robust estimator from proof that confounding has been removed.

Why augment a matched-cohort analysis?

Matching can make treated and comparison participants more similar on measured baseline covariates. An augmented inverse-probability-weighted (AIPW) estimator adds outcome-model predictions to inverse-probability weighting: it uses both a model for treatment assignment and models for the outcome under each treatment level. The augmentation can improve precision, and the estimator has a useful consistency property when one of these modeling strategies is correct.

That property is not a substitute for careful design. AIPW does not ensure that the matched cohort has adequate overlap, remove unmeasured confounding, or make a poorly chosen target population appropriate. Here, the target is the average treatment effect (ATE) among the people retained in a matched cohort, with one row per person and no additional matching weights. The target is not automatically the ATE in the original eligible population.

Definition: Let \(A_i=1\) denote treatment and \(A_i=0\) comparison, let \(Y_i(1)\) and \(Y_i(0)\) be person \(i\)'s potential outcomes, and let \(X_i\) be measured pretreatment covariates. The ATE in the retained cohort is \(E[Y(1)-Y(0)\mid S=1]\), where \(S=1\) indicates inclusion in that cohort. Define the propensity score \(e(X)=P(A=1\mid X,S=1)\) and outcome regressions \(m_a(X)=E[Y\mid A=a,X,S=1]\), for \(a=0,1\).

The observed outcome is \(Y_i=A_iY_i(1)+(1-A_i)Y_i(0)\), by consistency. The causal interpretation also requires no interference between people, conditional exchangeability \((Y(1),Y(0))\perp A\mid X,S=1\), and positivity \(0<e(X)<1\) for covariate patterns represented in the target cohort. These assumptions concern the retained cohort. Matching alone does not establish them; in particular, matching or trimming can leave some covariate patterns with few or no treated or comparison participants.

The estimator and its double-robustness property

Fit a treatment model to estimate \(e(X_i)\), commonly a logistic regression, and fit outcome regressions separately by treatment group to estimate \(m_1(X_i)\) and \(m_0(X_i)\). For a continuous outcome, these might be linear regressions; other outcome types may need suitable models for their conditional means. The AIPW estimate for the retained cohort is

$$ \widehat{\tau}_{\mathrm{AIPW}} = \frac{1}{n}\sum_{i=1}^{n} \left[ \widehat{m}_1(X_i)-\widehat{m}_0(X_i) +\frac{A_i\{Y_i-\widehat{m}_1(X_i)\}}{\widehat{e}(X_i)} -\frac{(1-A_i)\{Y_i-\widehat{m}_0(X_i)\}}{1-\widehat{e}(X_i)} \right]. $$

The first term compares the predicted outcomes under treatment and comparison for everyone in the target cohort. The next two terms correct those predictions using observed outcome residuals, weighted by the inverse probability of the treatment actually received. A treated person's residual contributes only to the treated correction, and a comparison person's residual contributes only to the comparison correction.

The estimator's central result is asymptotic: under the causal assumptions and appropriate regularity conditions, it is consistent for the ATE if either the propensity model is correctly specified or both outcome regressions are correctly specified. “Double robust” does not mean that both models are guaranteed correct, that the finite-sample estimate is exactly unbiased, or that the causal assumptions can be ignored.

Why either model can be enough

The two routes to consistency can be seen by taking conditional expectations at a given \(X\). First suppose both outcome regressions are correct, so \(m_a(X)=E[Y(a)\mid X,S=1]\). By exchangeability and consistency, the observed outcome in each treatment group has the corresponding potential-outcome mean. The weighted residual corrections then have conditional expectation zero (when the propensity scores used as weights are valid probabilities), leaving \(m_1(X)-m_0(X)\).

Now suppose instead that the propensity model is correct, while the outcome regressions may be misspecified. Write the fitted regressions as \(q_1(X)\) and \(q_0(X)\). Correct propensity scores and the causal assumptions imply

$$ \begin{aligned} E\left[\frac{A\{Y-q_1(X)\}}{e(X)}\mid X,S=1\right] &=E[Y(1)\mid X,S=1]-q_1(X),\\ E\left[\frac{(1-A)\{Y-q_0(X)\}}{1-e(X)}\mid X,S=1\right] &=E[Y(0)\mid X,S=1]-q_0(X). \end{aligned} $$

Adding the first expression to \(q_1(X)-q_0(X)\), and subtracting the second, cancels both potentially misspecified predictions. What remains is \(E[Y(1)-Y(0)\mid X,S=1]\). Averaging over the cohort's covariate distribution gives the target ATE. This argument explains the augmentation; it does not show that either model is correct in a particular data set.

Worked Example: Calculating the AIPW Estimate

Consider six hypothetical people retained in a matched cohort. The outcome is a 30-day symptom score, with higher scores indicating more symptoms. Suppose a logistic treatment model and two linear outcome regressions were fitted to the retained cohort. The table gives their fitted probabilities and predicted scores. For this illustration, each person appears once and has equal weight in the cohort mean.

Person\(A_i\)\(Y_i\)\(\widehat e(X_i)\)\(\widehat m_1(X_i)\)\(\widehat m_0(X_i)\)
T1180.6075
T2160.706.54.5
T3190.8086
C1040.3075
C2030.4064
C3070.5086

For T1, the individual contribution is \(7-5+(8-7)/0.60=3.667\). For T2 it is \(6.5-4.5+(6-6.5)/0.70=1.286\), and for T3 it is \(8-6+(9-8)/0.80=3.250\). For comparison participants the residual correction is subtracted: C1 contributes \(7-5-(4-5)/(1-0.30)=3.429\), C2 contributes \(6-4-(3-4)/(1-0.40)=3.667\), and C3 contributes \(8-6-(7-6)/(1-0.50)=0\).

Thus, using all six contributions,

$$ \widehat{\tau}_{\mathrm{AIPW}} =\frac{3.667+1.286+3.250+3.429+3.667+0}{6} =2.550. $$

Under the stated assumptions, the estimate is an estimated increase of 2.550 symptom-score points under treatment versus comparison for the retained cohort. It is not, by itself, a measure of statistical uncertainty or evidence that the assumptions hold. The fitted predictions are illustrative model output; they are not established merely by being listed in a table.

Check balance, overlap, and model behavior

Diagnostics should be considered before interpreting an adjusted estimate. Examine the covariate balance produced by the original matching and, where useful, balance after applying the AIPW inverse-probability weights. For the ATE, those weights are proportional to \(A_i/\widehat e(X_i)\) in the treated group and \((1-A_i)/(1-\widehat e(X_i))\) in the comparison group. Check baseline covariates and important transformations or interactions, not only the covariates used in a simple model. Balance is a comparison of measured covariate distributions; it cannot diagnose unmeasured confounding.

Also inspect the estimated propensity scores by treatment group and the size of the inverse-probability weights. Estimates near zero or one can give some people substantial influence. A useful summary is the effective sample size for a set of weights \(w_i\), defined as \((\sum_i w_i)^2/\sum_i w_i^2\). A small effective sample size relative to the number of people signals that the weighted estimate is being driven by relatively few observations. Do not treat a finite fitted probability as proof of adequate practical overlap.

Worked Example: A Weighted Balance Check

Suppose the six people above have a binary baseline severity indicator: it equals 1 for T1, T3, C1, and C3, and 0 for T2 and C2. The treated and comparison groups each have an unweighted severe proportion of \(2/3=0.667\). Using ATE inverse-probability weights, the treated weighted proportion is

$$ \frac{1/0.60+1/0.80}{1/0.60+1/0.70+1/0.80} =\frac{2.917}{4.345}=0.671. $$

The comparison weighted proportion is

$$ \frac{1/(1-0.30)+1/(1-0.50)} {1/(1-0.30)+1/(1-0.40)+1/(1-0.50)} =\frac{3.429}{5.095}=0.673. $$

The weighted difference is about \(-0.002\), a small measured imbalance for this covariate in this tiny illustration. This single result is not a general balance certificate: inspect all relevant covariates, the propensity-score distributions, and the influence of the weights. With only six people, even a small difference is especially weak evidence about balance in a broader population.

Outcome-model diagnostics also matter. Examine whether the form of each regression is reasonable for the outcome and covariates, and whether predictions are plausible across the observed covariate range. A model that fits observed outcomes well overall may still misrepresent treatment-specific conditional means. No diagnostic test can certify correct specification; substantive knowledge and sensitivity to reasonable alternative specifications remain important.

How AIPW differs from alternatives

ApproachWhat it contributesImportant qualification
Matching followed by a simple outcome comparisonCompares outcomes in the retained, matched groups.Residual covariate imbalance can remain; the comparison must respect the matching design.
Outcome regressionStandardizes predicted outcomes over the target cohort's covariate distribution.Consistency depends on the outcome models being adequate for both treatment levels.
Inverse-probability weightingReweights observed treatment groups using estimated treatment probabilities.Can be unstable with extreme probabilities and depends on a correct propensity model for consistency.
AIPWCombines outcome predictions with weighted residual corrections.Has the stated double-robust consistency property, but still needs causal assumptions, adequate overlap, and appropriate inference.

If the matched design uses unequal matching weights, sampling weights, or repeated use of a comparison person, the simple unweighted cohort mean above may not represent the intended target. Specify the estimand and design weights first, then use an estimator and variance procedure that correspond to them; duplicated records should not be treated as independent people. For matched sets, uncertainty calculations should also respect the dependence induced by the design. A point estimate without an appropriate standard error or interval does not quantify sampling uncertainty.

Common pitfalls and limitations

  • “Double robust” means no assumptions are needed. It does not. Consistency still requires the causal identification assumptions, including conditional exchangeability and positivity in the target cohort.
  • One correct outcome regression is enough. For the outcome-model route, both \(m_1(X)\) and \(m_0(X)\) must be correctly specified. The alternative route is a correct propensity model.
  • Matching guarantees exchangeability. Matching can balance measured covariates, but does not establish that all confounders were measured or appropriately controlled.
  • Extreme weights are harmless because the estimator is augmented. Augmentation does not make poor overlap disappear. Extreme weights can make estimates unstable and highly sensitive to a few observations.
  • The estimate applies to the original cohort. Unless the design and estimator target that population, the result refers to the retained matched cohort and its covariate distribution.

AIPW is most useful when both treatment and outcome models are thoughtfully specified and their diagnostics are reported. It is not a mechanism for selecting the model that produces the preferred estimate. Report the target population, the matching and analysis choices, model specifications, balance and overlap findings, and an uncertainty estimate appropriate to the design.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In the AIPW formula, which model supplies the denominator for the treated residual correction?
  2. State the two alternative model-correctness routes to consistency.
  3. Why does a near-zero estimated propensity score for a treated person raise concern?
  4. Does good measured-covariate balance prove conditional exchangeability? Explain.

Solutions. (1) The propensity model supplies \(\widehat e(X_i)\), the estimated probability of treatment. (2) Either the propensity model is correctly specified, or both treatment-specific outcome regressions are correctly specified, along with the causal assumptions and regularity conditions. (3) The treated person's correction uses \(1/\widehat e(X_i)\), which can become very large and give that person excessive influence; it may also indicate inadequate overlap. (4) No. Balance describes measured covariates only. Conditional exchangeability also rules out residual confounding by unmeasured or inadequately modeled covariates and cannot be established from balance diagnostics alone.

Clinical Biostats