Confounding as a Parameter
Python · PyMC · ArviZ · LaLonde NSW/CPS, 614 observations
A Threshold Is Not an Answer
The sensitivity notebook ended on a number that is hard to act on. Nearest-neighbour propensity matching recovered the experimental benchmark almost exactly — USD 1,792 against a randomized truth of USD 1,794 — and Rosenbaum bounds then showed the result is destroyed by a confounder shifting within-pair treatment odds by a factor of only .
That is a tipping point. It says where the conclusion breaks and nothing about whether we are likely to be past it. A referee asking "is 1.21 a lot?" gets no answer from the number itself, because is a worst case over all confounders of that strength, and worst cases are rarely where reality sits.
This page asks it the other way round. Instead of finding the confounder strength at which the result dies, put a prior on how strong the unobserved confounder plausibly is and integrate it out. What comes back is a posterior on the treatment effect that already accounts for hidden confounding — a distribution rather than a breakpoint.
The move that makes this honest rather than decorative is benchmarking. The prior on the unobserved confounder is calibrated against the confounders that were measured, so "plausible" means no stronger than the eight covariates already in the model. That is a defensible claim rather than a guess, and Imbens (2003) made exactly this argument on exactly this dataset.
What a Confounder Would Have to Do
If a confounder is omitted, the estimate is biased by a quantity with a clean structure — is how much moves the outcome (dollars per standard deviation, covariates held fixed), and is how imbalanced is between arms after adjustment. A confounder must do both to matter.
Both quantities are measurable for the covariates we do observe, which is what makes calibration possible — and the formula is checked rather than assumed. Dropping each covariate in turn and refitting reproduces to the dollar, with a largest discrepancy of zero. That is what licenses applying the same arithmetic to a confounder nobody can measure.
| covariate | γ USD per SD | δ SD imbalance | bias it causes | actual, if dropped |
|---|---|---|---|---|
black | −607 | 1.12 | −678 | −678 |
re74 | 1,918 | −0.17 | −327 | −327 |
educ | 1,061 | 0.19 | 198 | 198 |
re75 | 762 | 0.06 | 48 | 48 |
married | 200 | −0.24 | −48 | −48 |
hispan | 161 | 0.18 | 30 | 30 |
nodegree | 125 | 0.17 | 22 | 22 |
age | 128 | 0.13 | 16 | 16 |
Regression-adjusted estimate USD 1,548 (SE 781) against a randomized benchmark of USD 1,794. Largest gap between the formula and the refit: USD 0.
The worst confounder here is not the variable that predicts earnings best. re74 has by far the largest outcome coefficient — USD 1,918 per standard deviation — and contributes only USD 327 of bias, because after adjustment it is barely 0.17 standard deviations out of balance. black is about half as predictive of earnings but sits 1.12 standard deviations apart between the arms (84% of NSW trainees against 20% of CPS respondents) and contributes USD 678, the largest of the eight.
Confounding is a product, so a variable can be strongly prognostic and harmless, or weakly prognostic and devastating. Ranking candidate confounders by how well they predict the outcome — the usual instinct, and the one behind most "but did you control for…" objections — gets this dataset wrong.
A Prior for Something Nobody Measured
Three calibrations are run, from generous to severe, with half-normal priors on the magnitudes and the imbalance free to take either sign, since a confounder is as free to hide a real effect as to manufacture a false one. Sampling uncertainty in enters at the same time, so the posterior mixes both sources of doubt rather than reporting them separately.
| confounder assumed | implied bias median / 95th | effect | 95% interval | Pr(effect > 0) |
|---|---|---|---|---|
| none the usual report | — | 1,548 | [17, 3,080] | 0.976 |
| as a typical observed covariate | $27 / $158 | 1,559 | [29, 3,112] | 0.978 |
| as the strongest observed covariate | $765 / $4,628 | 1,555 | [−3,218, 6,315] | 0.827 |
| twice the strongest | $3,098 / $19,029 | 1,699 | [−17,146, 20,909] | 0.663 |
Worst observed bias for comparison: USD 678. Sampler health: maximum r-hat 1.000 across all three fits — 1.00 is what a converged chain looks like — and one divergence in the first.
The implied bias column is the calibration made auditable rather than trusted: it is what each prior actually asserts about the damage could do, against a worst observed bias of USD 678. Note that a half-normal whose scale is set to the largest observed value still places plenty of mass above it, so these labels are generous rather than strict. The third row is frankly beyond anything the data support, and is included to show how quickly the analysis goes uninformative once that is allowed.
Now the part that is easy to misread. The posterior mean barely moves across the three rows — 1,559, then 1,555, then 1,699 — while the interval widens from about USD 3,000 to USD 38,000. Because the confounder is as free to hide a real effect as to invent one, symmetric confounding uncertainty widens the posterior without shifting it.
So sensitivity analysis is not a bias correction. It does not say the answer was really smaller. It says how much less is known than the unadjusted interval claimed — which is a different and less comfortable kind of result, and the reason it is so often reported as a single threshold instead.
What It Buys Over the Threshold
The question can also be asked in reverse, on the only scale anyone has intuition for. Wiping out the estimate entirely requires USD 1,548 of bias. The worst confounder actually in the model supplies USD 678. So the unobserved confounder would have to be about 2.3 times as damaging as the worst one we measured — a claim a subject-matter referee can actually argue with.
That is the reporting a threshold cannot produce. states that a confounder of that strength exists which would overturn the finding; it attaches no probability to that confounder being real, and says nothing about confounders of any other strength. The posterior prices the whole range, so the reportable claim becomes "positive with probability 0.83 even against a confounder as strong as the worst one we measured" rather than "it breaks at 1.21".
| confounder assumed | Pr(effect > 0) | Pr(effect > USD 1,000) |
|---|---|---|
| as a typical observed covariate | 0.978 | 0.761 |
| as the strongest observed covariate | 0.827 | 0.646 |
| twice the strongest | 0.663 | 0.568 |
The limit is worth stating plainly. None of this is a test. If the true confounder is genuinely unlike anything observed — a selection process the CPS never asked about — the calibration has nothing to say, and the third row shows how fast the intervals become useless once that possibility is admitted. Benchmarking makes the prior defensible; it does not make it true.
Where this sits
This is the Bayesian counterpart to Rosenbaum bounds and the E-value, and it inherits the estimate produced by matching and regression adjustment. It is also the one place in the causal collection where a prior is doing something no amount of data could: standing in for a variable that was never recorded. The Bayesian analysis of randomized experiments asks the opposite question, where identification is settled and the prior competes against data rather than substituting for it.
Notebook
Downloads
References
- Rubin, D. B. (1978). Bayesian Inference for Causal Effects: The Role of Randomization. The Annals of Statistics 6(1). — causal effects as a missing-data problem
- Rosenbaum, P. R. & Rubin, D. B. (1983). The central role of the propensity score in observational studies for causal effects. Biometrika 70(1), 41–55. — adjustment by the propensity score
- Wang, C., Parmigiani, G. & Dominici, F. (2012). Bayesian Effect Estimation Accounting for Adjustment Uncertainty. Biometrics 68(3), 661–671. — carrying adjustment uncertainty through to the estimate
- Zigler, C. M. & Dominici, F. (2014). Uncertainty in Propensity Score Estimation: Bayesian Methods for Variable Selection and Model-Averaged Causal Effects. Journal of the American Statistical Association 109(505), 95–107. — model averaging over which confounders to include