Confounding by Indication Simulator

Sicker patients get the more aggressive operation, so the aggressive operation looks harmful. Adjust, stratify, and watch the sign flip.

  • causal inference
  • confounding
  • adjustment
  • treatment effect
True effect
-2.000
Crude difference
2.013
confounded
Adjusted for measured L
-0.975
Residual bias
1.025

Outcome vs. measured severity, by treatment

-3-2-10123-505101520Measured severity LeGFR decline (higher = worse)
Partial (conservative)Radical (aggressive)

Treatment contrast within severity strata

true effect00.511.522.533.544.55-2-1.5-1-0.500.5Severity quintileMean outcome difference

Stratum detail

Empty or near-empty cells signal a positivity violation: within that stratum the data cannot speak to the contrast.
Severity quintilen radicaln partialWithin-stratum difference
Q125.00095.0000.780
Q235.00085.000-0.908
Q359.00061.000-1.438
Q474.00046.000-0.664
Q594.00026.0000.061
Sign reversal is the point
Set the true effect to −2 (beneficial) and push indication strength above 2. The crude difference becomes positive: the operation that helps appears to harm, purely because it was reserved for the patients who were already worse off.