How it works#
1. cross-fit mu(x, a) = E[Y | X, A] and pi(a | x) (density of the dose given X)
2. pseudo-outcome xi = (Y - mu(X, A)) * varpi(A) / pi(A | X) + m(A)
3. regress xi on A with penalised splines:
theta_store(a) = B(a)' (beta_global + b_region + b_store)
ridge penalties on the deviations b shrink small groups toward their parent (tuned by GCV)
varpi is the marginal density of the dose and m(a) the outcome model averaged over X. The
pseudo-outcome’s mean, given the dose, is the true curve if either nuisance model is right.
How it compares#
One population curve, 10 simulated datasets per setting. RMSE of the centred curve / share of doses where the 95% band contains the truth.
5 confounders |
50 confounders |
Harder data |
|
|---|---|---|---|
drcurves, default |
0.06 / 75% |
0.04 / 93% |
0.25 / 75% |
drcurves, |
0.07 / 88% |
0.05 / 90% |
0.39 / 18% |
npcausal (R) |
0.08 / 90% |
0.18 / 77% |
0.30 / 13% |
causal-curve (Python) |
0.54 / 100% |
0.30 / 100% |
0.44 / 100% |
drcurves with boosting alone |
0.19 / 94% |
3.43 / 87% |
3.07 / 97% |
The harder data has thresholds, interactions and heavy-tailed noise; there, boosting alone gave the best outcome model (0.18 with balancing weights, but 43% coverage). No learner wins everywhere, which is why the default stacks two. causal-curve’s bands are 25+ times wider than the others’. These are our simulations with each package’s defaults; treat the ranking as indicative.