Linear and Nonlinear Data Generating Process benchmarking
Linear Data Generating Process (DGP)
Let . Draw confounders:
Stack them as
Treatment model
with calibrated (by bisection) so that , and
Then
Outcome model
with , and
Oracle nuisances (IRM) and CATE
Targets
So under this constant-effect DGP:
Let's generate the Data
Treatment share ≈ 0.2052 Ground-truth ATE from the DGP: 0.800 Ground-truth ATT from the DGP: 0.800
Wrap it in CausalData Object
| y | d | tenure_months | avg_sessions_week | spend_last_month | premium_user | urban_resident | |
|---|---|---|---|---|---|---|---|
| 0 | 1.903910 | 0.0 | 12.130544 | 4.056687 | 181.570607 | 0.0 | 0.0 |
| 1 | 3.388144 | 0.0 | 19.586560 | 1.671561 | 182.793598 | 0.0 | 0.0 |
| 2 | 8.456512 | 1.0 | 39.455103 | 5.452889 | 125.185708 | 1.0 | 1.0 |
| 3 | 5.535970 | 1.0 | 26.327693 | 5.051629 | 4.932905 | 0.0 | 1.0 |
| 4 | 4.965140 | 1.0 | 35.042771 | 4.933996 | 23.577407 | 0.0 | 0.0 |
Estimate ATE and ATTE
Real ATE = 0.8 VS Estimated = 0.7506313322797796 in (0.6668061755942251, 0.8344564889653342)
Real ATTE = 0.8 VS Estimated = 0.8238669785039335 in (0.7558326760362799, 0.8919012809715872)
The estimated ATE and ATTE are close to the ground truth values. But we got wide confidence_intervals. Adding more data makes the intervals narrower. You can try it when changes the n in GDP
Nonlinear Data Generating Process (DGP)
Let . Draw confounders:
Stack them as
Treatment model
Define
with calibrated (by bisection) so that .
The nonlinear score includes alignment with the treatment effect :
where and is the indicator.
Then
Outcome model
with .
The baseline outcome component is nonlinear:
The heterogeneous treatment effect (CATE) is
Oracle nuisances (IRM) and CATE
Targets
Treatment share ≈ 0.2036 Ground-truth ATE from the DGP: 0.913 Ground-truth ATT from the DGP: 1.567
| y | d | tenure_months | avg_sessions_week | spend_last_month | premium_user | urban_resident | |
|---|---|---|---|---|---|---|---|
| 0 | 0.689404 | 0.0 | 12.130544 | 4.056687 | 181.570607 | 0.0 | 0.0 |
| 1 | 3.045282 | 0.0 | 19.586560 | 1.671561 | 182.793598 | 0.0 | 0.0 |
| 2 | 7.173595 | 1.0 | 39.455103 | 5.452889 | 125.185708 | 1.0 | 1.0 |
| 3 | 1.926216 | 0.0 | 26.327693 | 5.051629 | 4.932905 | 0.0 | 1.0 |
| 4 | 1.225088 | 0.0 | 35.042771 | 4.933996 | 23.577407 | 0.0 | 0.0 |
Real ATE = 0.913 VS Estimated = 0.9917276396749556 in (0.869543879249174, 1.1139114001007373)
Real ATTE = 1.567 VS Estimated = 1.6433239376940343 in (1.4972790851652928, 1.7893687902227757)
The estimated ATE and ATTE are close to the ground truth values. But we got wide confidence_intervals. Adding more data makes the intervals narrower. You can try it when changes the n in GDP