Tutorials › Causal Inference › Simulation Diagnostics for Doubly Robust Estimators

Doubly Robust and Semiparametric Methods · Tutorial 488 of 972

Simulation Diagnostics for Doubly Robust Estimators

Build a simulation that separates estimator behavior across realistic data-generating conditions and interprets the resulting performance measures with Monte Carlo uncertainty.

Advanced 12 min read

What You'll Learn

  • Specify a known causal target and data-generating process for comparing AIPW and TMLE.
  • Vary propensity-score and outcome-model correctness independently.
  • Design overlap and sample-size scenarios that reveal instability and finite-sample behavior.
  • Calculate bias, empirical variance, confidence-interval coverage, and estimator failure rates.
  • Quantify Monte Carlo error and interpret comparisons without assuming one estimator must always win.

Why Simulation Diagnostics Need a Design

AIPW and TMLE have useful robustness properties, but those properties do not guarantee identical finite-sample performance in every data set. Estimates can be variable when treatment probabilities are extreme, confidence intervals can miss their target more often than intended, and an estimator can fail to return a usable result. A simulation study makes these features visible under controlled conditions, because the data-generating process supplies a known causal target against which estimates can be checked.

The goal is not to declare one method universally superior. It is to learn how performance changes when one or both nuisance models are misspecified, when overlap weakens, and when the sample size changes. A credible comparison sets these conditions deliberately, uses the same simulated data for both methods, and reports failures as well as successful estimates.

Definition: A simulation replicate is one data set generated under a specified data-generating process and sample size, followed by application of the estimators being compared. A simulation scenario is a fixed combination of data-generating conditions, such as nuisance-model correctness, overlap, and sample size. The target parameter is known from the process that generates the data.

Define the Target and Data-Generating Process

For a simple comparison, let \(A\) be a binary treatment, \(Y\) a binary outcome, and \(X\) a measured covariate. Write \(Y(1)\) and \(Y(0)\) for the potential outcomes under treatment and control. The average treatment effect (ATE) is \(\psi_0=E[Y(1)-Y(0)]\). A simulation designed to study AIPW and TMLE should state this target before generating data, then choose a process with a known \(\psi_0\).

For example, let \(X\sim\mathrm{Bernoulli}(0.5)\), and generate treatment according to \(P(A=1\mid X=0)=0.30\) and \(P(A=1\mid X=1)=0.70\). Generate potential outcomes with \(P(Y(0)=1\mid X)=0.15+0.10X\) and \(P(Y(1)=1\mid X)=0.35+0.10X\). Conditional on \(X\), treatment assignment is independent of the potential outcomes. The difference in the two conditional outcome probabilities is \(0.20\) at both values of \(X\), so the marginal ATE is also \(0.20\). Treatment probabilities lie between zero and one, and both treatment groups occur at each value of \(X\); thus positivity holds in this process.

To investigate overlap, keep the outcome process fixed but change the treatment probabilities, for instance to \(0.05\) and \(0.95\). Positivity still holds mathematically, but some covariate-treatment combinations are rare and inverse-probability weights can be large. To investigate model correctness, fit nuisance models that either represent the generating relationships or deliberately omit relevant structure. With binary \(X\), a treatment model that includes \(X\) can represent the specified propensity scores; a model omitting \(X\) generally cannot when the probabilities differ by \(X\). The outcome model should include the treatment and covariate structure needed to represent the conditional outcome means.

Worked Example: Setting Up a Factorial Simulation

Suppose the target is the ATE in the process above, so \(\psi_0=0.20\). Choose sample sizes \(n=200\) and \(n=1000\), overlap settings \((0.30,0.70)\) and \((0.05,0.95)\), and four nuisance-model conditions: both models correct, only the treatment model correct, only the outcome model correct, and neither model correct.

These choices create \(2\times2\times4=16\) scenarios. For each scenario, generate, for example, \(R=1000\) independent data sets. Fit AIPW and TMLE to each data set using the same prespecified nuisance-model choices. The value to which every estimate is compared remains \(0.20\); changing overlap or sample size does not change the estimand.

Under the two overlap settings, the smallest true treatment probability is respectively \(0.30\) and \(0.05\). The corresponding largest inverse probabilities are \(1/0.30=3.33\) and \(1/0.05=20\). This calculation does not predict the exact variability of either estimator, but it shows why the second setting is a deliberate stress test for weight-related instability.

The one-model-correct scenarios are important because double robustness concerns consistency when at least one relevant nuisance model is correctly specified, under the required identification and regularity conditions. The both-wrong scenario tests what happens when that protection is absent. Simulation results can show finite-sample behavior under these conditions; they do not establish that an unknown real-world nuisance model is correct.

Choose Metrics Before Running the Simulation

For estimator \(j\), let \(\hat\psi_{jr}\) be its estimate in replicate \(r\), and let \(R_s\) be the number of successful estimates in a scenario. The empirical bias is the mean estimate minus the known target. The empirical variance describes replicate-to-replicate dispersion; the empirical standard deviation is its square root. These are distinct from the average standard error reported by the estimator.

$$ \widehat{\mathrm{Bias}}_j = \frac{1}{R_s}\sum_{r\in\mathcal{S}}\hat\psi_{jr}-\psi_0, \qquad \widehat{\mathrm{Var}}_j = \frac{1}{R_s-1}\sum_{r\in\mathcal{S}} \left(\hat\psi_{jr}-\bar{\hat\psi}_j\right)^2 $$

Here \(\mathcal{S}\) is the set of successful replicates and \(\bar{\hat\psi}_j\) is their mean estimate. Report the number of attempts and successes as well as these conditional summaries. If failures are excluded from the bias calculation, the reported bias describes successful runs only; it should not conceal a high failure rate.

For a nominal 95% confidence interval, coverage is the proportion of intervals that contain \(\psi_0\). State how failures enter this calculation. One operational choice is to divide the number of covering intervals by all attempted replicates and count a failed replicate as not covered. Also report coverage among successful intervals, so readers can distinguish interval performance from computational failure. The failure rate is the number of failed attempts divided by the total number attempted. Define failure in advance, such as a nonfinite estimate, a nonconvergent targeting step, or inability to produce the prespecified interval; do not remove inconvenient results after seeing them.

Key diagnostic: Bias, empirical variance, coverage, and failure rate answer different questions. Low bias does not imply reliable intervals, and apparently good coverage among successful runs can be misleading if many attempts fail.

Worked Performance Calculations

Worked Example: Calculating Bias, Variance, Coverage, and Failure

Consider five attempted replicates with true ATE \(\psi_0=0.20\). An estimator returns \(0.18\), \(0.22\), \(0.26\), and \(0.34\) in four replicates, and fails in the fifth. Suppose the four corresponding 95% intervals are \((0.10,0.26)\), \((0.13,0.31)\), \((0.17,0.35)\), and \((0.25,0.43)\).

Failure rate. One of five attempts failed, so the rate is \(1/5=0.20\), or 20%.

Bias among successful estimates. Their mean is \((0.18+0.22+0.26+0.34)/4=1.00/4=0.25\). The estimated bias is \(0.25-0.20=0.05\), or 5 percentage points on the outcome-risk-difference scale.

Empirical variance. The deviations from \(0.25\) are \(-0.07\), \(-0.03\), \(0.01\), and \(0.09\). Therefore, \(s^2=(0.0049+0.0009+0.0001+0.0081)/(4-1)=0.0140/3=0.00467\). The empirical standard deviation is \(\sqrt{0.00467}=0.0683\), or about 6.83 percentage points.

Coverage. The first three intervals contain \(0.20\); the fourth does not. Coverage among successful intervals is \(3/4=75\%\). If failed attempts count as not covered, operational coverage is \(3/5=60\%\). These are not estimates precise enough to judge a nominal 95% procedure; the example shows the calculations and why the denominator must be explicit.

A simulation also has Monte Carlo error: repeating the entire simulation with a different random seed would produce slightly different performance summaries. For a coverage estimate \(\hat c\) based on \(R\) independent attempted replicates, a useful approximate Monte Carlo standard error is \(\sqrt{\hat c(1-\hat c)/R}\), when coverage is coded for every attempt according to the chosen failure rule. This follows from treating each replicate's coverage indicator as a Bernoulli variable with variance \(c(1-c)\); the variance of its sample mean is \(c(1-c)/R\). Substituting \(\hat c\) gives the estimated standard error.

Worked Example: Quantifying Monte Carlo Error in Coverage

Suppose a method covers the true target in 940 of \(R=1000\) attempted replicates, with failed runs counted as not covered. Then \(\hat c=940/1000=0.94\), and \(SE_{\mathrm{MC}}=\sqrt{0.94(1-0.94)/1000}=\sqrt{0.0000564}=0.00751\).

The estimated coverage is 94.0%, with Monte Carlo standard error about 0.75 percentage points. The difference between 94.0% and the nominal 95% is only about 1.33 Monte Carlo standard errors, so this result alone is not strong evidence of a substantial coverage deficit. More replicates can reduce Monte Carlo error, but they cannot repair a flawed data-generating process or an incorrectly implemented estimator.

Compare Methods Fairly and Interpret the Results

The strongest design compares AIPW and TMLE on the same replicate data sets, with the same target, nuisance-model information, and interval convention. This pairing reduces noise in their difference: an unusually difficult simulated data set affects both methods rather than one method being evaluated on a separate draw. Keep the data-generation code, fitting rules, interval formula, and failure definitions fixed across methods wherever the comparison permits.

The following hypothetical results illustrate how a report might separate conditions. They are not universal performance claims. Bias and standard deviation are shown in ATE units; coverage uses all 1000 attempts, with failures counted as not covered.

Scenario (nuisance models; overlap; n)MethodBiasEmpirical SDCoverageFailure rate
One model correct; good; 500AIPW0.0020.08494.4%0.0%
One model correct; good; 500TMLE0.0010.08394.7%0.0%
Both correct; poor; 500AIPW0.0040.18190.1%1.2%
Both correct; poor; 500TMLE0.0030.17691.6%0.8%
Both misspecified; good; 200AIPW0.0710.10561.2%0.0%
Both misspecified; good; 200TMLE0.0680.10462.8%0.0%

Worked Example: Reading a Scenario Comparison

In the poor-overlap rows, AIPW has empirical standard deviation \(0.181\), compared with \(0.084\) in the first AIPW scenario. The ratio is \(0.181/0.084=2.15\), so replicate estimates are substantially more dispersed in this hypothetical poor-overlap setting. The small reported biases do not erase that variability, and the 90.1% operational coverage is below the nominal 95%.

In the both-misspecified rows, bias is \(0.071\) for AIPW and \(0.068\) for TMLE, while coverage is 61.2% and 62.8%. Because both nuisance models are wrong in this scenario, the near-similarity does not establish that either estimator is generally robust to simultaneous misspecification. It indicates that, under this particular generating process and fitting choice, both procedures have appreciable bias and poor coverage.

The table does not prove that TMLE is better: its small differences could reflect Monte Carlo variation, and the results depend on the process and implementation. A careful report would include Monte Carlo uncertainty for key comparisons, show results across all prespecified scenarios, and investigate why failures occur rather than treating their rate as a footnote.

Practical Design and Common Pitfalls

A useful simulation plan specifies the estimand, data-generating mechanisms, nuisance-model correctness conditions, overlap settings, sample sizes, number of replicates, interval procedure, and failure rule before examining results. When varying one feature, hold others fixed if the purpose is to isolate that feature; factorial designs are also useful when interactions are of interest. In particular, weak overlap may be more consequential at small sample sizes, so reporting only a single sample size can miss an important pattern.

  • Changing the target accidentally. Keep the target parameter fixed when changing overlap or sample size, unless a changed target is an explicit part of the design.
  • Reporting only successful fits. A conditional bias or coverage summary cannot reveal how often the method failed. Show the attempted denominator and failure rate.
  • Calling a finite-sample result a general guarantee. A simulation evaluates the specified mechanisms and fitting procedures; it cannot prove universal performance or identify which nuisance model is correct in an application.
  • Comparing methods on different simulated samples. Unpaired runs add avoidable variation to method comparisons. Use shared replicate data and report paired differences when comparing summaries.
  • Equating empirical spread with standard-error quality. Empirical standard deviation measures variation across replicates; average estimated standard error assesses the estimator's uncertainty estimates. Compare them, and assess coverage, rather than substituting one for another.
Key takeaway: A diagnostic simulation is only as informative as its design. Vary nuisance-model correctness, overlap, and sample size deliberately; track bias, dispersion, coverage, and failures separately; and interpret every comparison in light of the data-generating process and its Monte Carlo uncertainty.

Check Your Understanding

Use these questions to check whether you can plan and interpret a simulation comparison.

  1. Why should the true ATE be known and held fixed when overlap is varied?
  2. What does a high empirical standard deviation reveal that a small empirical bias does not?
  3. If failed runs are excluded from the coverage denominator, what additional result should be reported?
  4. For estimated coverage of 0.95 over 400 independent replicates, calculate the approximate Monte Carlo standard error using \(\sqrt{\hat c(1-\hat c)/R}\).
  5. Why is it useful to apply AIPW and TMLE to the same simulated data sets?
Clinical Biostats