The estimated effect assumes no unobserved confounding, which no data can check. Instead of asking whether a confounder exists, ask how strong it would have to be. Two numbers describe a hidden confounder: how much it adds to predicting treatment (alpha) and to predicting the outcome (partial R squared). The black curve collects all pairs that would produce a chosen bias; the dots show how strong the observed covariates are. Click the plot to place a hypothetical confounder, or use the sliders.
Simulated study of 2000 units with five covariates (x1 matters for both treatment and outcome, x2 for treatment only, x3 for outcome only, x4 for neither, x5 weakly for both); true effect 0.6; outcome and propensity models fitted by least squares and logistic regression. Under the Austen model the hidden confounder makes the latent propensity score Beta(g(1/alpha − 1), (1 − g)(1/alpha − 1)) around the observed g, and the bias is delta · alpha/(1 − alpha) · mean of 1/(g(1 − g)); the partial R squared of the outcome is converted to delta with the trigamma formula. A positive bias means the observed effect overstates the true one. The grey band is the curve for the bias ± 1.96 standard errors. The instrument slider splits every propensity score into g ± w · min(g, 1 − g) (same mean), as conditioning on a variable that predicts treatment does. In the (alpha, R squared) coordinates the curve hardly moves, because R squared is standardised by the same propensity scores; the harm shows when the raw delta is held fixed (button): the bias grows with the mean of 1/(g(1 − g)).
code/ch36_causality.py (austen_bias, austen_v, austen_curve, observed_calibration).