Brownight commited on
Commit
0e47b20
·
verified ·
1 Parent(s): 996dbb8

add DGP.md

Browse files
Files changed (1) hide show
  1. DGP.md +105 -0
DGP.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Instrumental-variables data-generating processes
2
+
3
+ Each table describes 500 independent units from one simulated study. The observed variables are baseline covariates `X`, a binary instrument `Z`, a binary treatment `D` and an outcome `Y`. Holding the study's family and parameter draw fixed, the target is the population local average treatment effect:
4
+
5
+ $$
6
+ \mathrm{LATE}=\mathbb E[Y(1)-Y(0)\mid D(1)>D(0)].
7
+ $$
8
+
9
+ Every design satisfies exclusion (Z affects Y only through D), monotonicity (D(1) ≥ D(0)) and independence of Z given X. The nuisance functions used by the reference methods are the instrument propensity e(x) = P(Z=1 | x), the treatment means mD(x,z) = P(D=1 | x, Z=z) and the outcome means mY(x,z) = E[Y | x, Z=z]; all three families give them in closed form, and the LATE equals E[mY(x,1) − mY(x,0)] / E[mD(x,1) − mD(x,0)].
10
+
11
+ ## How the splits were generated
12
+
13
+ | Released split | Tables | Family and parameter sampling |
14
+ |---|---:|---|
15
+ | Historical adapter training | 20,000 | Draw one of the three families with equal probability, then its parameters from the prior below, then 500 context rows and 64 query rows. Root seed 20261116, split id 0. |
16
+ | Historical validation | 1,000 | Same prior, root seed 20261116, split id 1. |
17
+ | Starter train / dev / test | 48 / 16 / 32 | Fresh draws from the same prior with seed 20261119 and split ids 0 / 1 / 2; 500 rows per table. |
18
+ | Pooled evaluation | 2,000 | Draw each family with probability 1/3, then its parameters, then its 500 rows. Seed 20261117. |
19
+
20
+ All randomness comes from `numpy.random.SeedSequence([seed, split_id, table_index])`, so every table can be regenerated from its indices with the generator shipped in the starter kit (`iv_data.py`, `reference/`). Evaluation draws one table per parameter draw; each table contributes one estimate and one interval.
21
+
22
+ | Family | Observed covariates | Outcome | Training tables | Validation tables | Evaluation tables |
23
+ |---|---:|---|---:|---:|---:|
24
+ | `ding` | 0 | binary | 6,756 | 317 | 665 |
25
+ | `qiu` | 2, 5, 10 or 20 | continuous | 6,547 | 333 | 658 |
26
+ | `kennedy2020` | 1 | binary | 6,697 | 350 | 677 |
27
+
28
+ ## Designs and parameter priors
29
+
30
+ U(a, b) is a continuous uniform distribution; alternatives in a set have equal probability; parameters are drawn once per table. The ranges are ours, chosen to cover a broad band of instrument strengths and effect sizes; they are not the settings used in the source papers.
31
+
32
+ ### Binary instrument with a latent binary confounder (`ding`)
33
+
34
+ Source design — Ding, VanderWeele and Robins (2017), *Instrumental variables as bias amplifiers with general outcome and confounding*, Biometrika 104(2), Table 1 ([doi](https://doi.org/10.1093/biomet/asx009)); generator copied verbatim from the Arena registry file `iv-ding-2017-binary-bias-v1.py`. No covariates: `X` has zero columns.
35
+
36
+ $$
37
+ \begin{aligned}
38
+ Z&\sim\mathrm{Bernoulli}(p_z), & U&\sim\mathrm{Bernoulli}(p_u),\\
39
+ D\mid Z,U&\sim\mathrm{Bernoulli}(p_{Z,U}), & Y\mid D,U&\sim\mathrm{Bernoulli}(r_{D,U}),
40
+ \end{aligned}
41
+ $$
42
+
43
+ with monotonicity p₁,ᵤ ≥ p₀,ᵤ. Draw order per unit: Z, U, D, Y.
44
+
45
+ | Parameter | Prior |
46
+ |---|---|
47
+ | p_z, p_u | U(0.2, 0.8) each |
48
+ | p₀,ᵤ for u ∈ {0, 1} | U(0.05, 0.60) each |
49
+ | p₁,ᵤ | p₀,ᵤ + (1 − p₀,ᵤ) f_u, f_u ~ U(0.1, 0.8) |
50
+ | r_{d,u}, four entries | U(0.005, 0.995) each |
51
+
52
+ Nuisances are constants: e = p_z, mD(z) = Σ_u P(U=u) p_{z,u}, mY(z) = Σ_u P(U=u) [(1 − p_{z,u}) r_{0,u} + p_{z,u} r_{1,u}]. LATE = Σ_u P(U=u)(p₁,ᵤ − p₀,ᵤ)(r₁,ᵤ − r₀,ᵤ) / Σ_u P(U=u)(p₁,ᵤ − p₀,ᵤ).
53
+
54
+ ### Principal strata with Poisson outcome shifts (`qiu`)
55
+
56
+ Source design — Qiu, Tao and Zhou (2021), *Inference of heterogeneous treatment effects using observational data with high-dimensional covariates*, JRSS-B 83(5), Section 6 DGP2 without interaction ([doi](https://doi.org/10.1111/rssb.12469)); generator copied verbatim from the Arena registry file `iv-qiu-2021-principal-stratum-poisson-v1.py`.
57
+
58
+ $$
59
+ \begin{aligned}
60
+ x_1&\sim N(0,\sigma_0), & x_j&=\rho\,x_{j-1}+\sqrt{\sigma_0(1-\rho^2)}\,\varepsilon_j\ (j\ge 2), & t&=\sum_{j=1}^{p} x_j/j^2,\\
61
+ Z&\sim\mathrm{Bernoulli}(L(t)), & D_0&=\mathbf 1[t-\zeta+\varepsilon_0\ge 0], & D_1&=D_0\vee\mathbf 1[t+\zeta+\varepsilon_1\ge 0],\quad D=D_Z,\\
62
+ Y&=\alpha_0 D+2t+\varepsilon+K_{11}D_0+K_{00}(1-D_1), & K_{11}&\sim\mathrm{Poisson}(\lambda_{11}), & K_{00}&\sim\mathrm{Poisson}(\lambda_{00}),
63
+ \end{aligned}
64
+ $$
65
+
66
+ with L the logistic function and ε, ε₀, ε₁, ε_j independent standard normal.
67
+
68
+ | Parameter | Prior |
69
+ |---|---|
70
+ | p | {2, 5, 10, 20} |
71
+ | σ₀ | U(0.25, 1) |
72
+ | ρ | U(0, 0.7) |
73
+ | ζ | U(0.3, 1.5) |
74
+ | α₀ | U(−2, 2) |
75
+ | λ₁₁, λ₀₀ | U(0, 1.5) each |
76
+
77
+ Nuisances: e(x) = L(t), mD(x,0) = Φ(t − ζ), mD(x,1) = a + (1 − a)Φ(t + ζ) with a = Φ(t − ζ), mY(x,z) = 2t + λ₁₁ a + λ₀₀ (1 − a)(1 − Φ(t + ζ)) + α₀ mD(x,z). LATE = α₀.
78
+
79
+ ### Sharp-instrument design with a latent complier type (`kennedy2020`)
80
+
81
+ Source design — Kennedy, Balakrishnan and G'Sell (2020), *Sharp instruments for classifying compliers and generalizing causal effects*, Annals of Statistics 48(4), Section 6.1 and Appendices E and I ([arXiv](https://arxiv.org/abs/1801.03635)).
82
+
83
+ $$
84
+ \begin{aligned}
85
+ X&\sim N(0,1), & C\mid X&\sim\mathrm{Bernoulli}(\Phi(b_0+b_1X)), & Z\mid X&\sim\mathrm{Bernoulli}(L(X)),\\
86
+ D&=CZ+(1-C)A^*,\ A^*\sim\mathrm{Bernoulli}(1/2), & Y^a&\sim\mathrm{Bernoulli}(0.5+(a-0.5)\beta), & Y&=Y^D.
87
+ \end{aligned}
88
+ $$
89
+
90
+ C is the latent complier indicator. (b₀, b₁) are solved from the complier strength μ = E[Φ(b₀ + b₁X)], fixed at 0.3, and the sharpness ψ of the paper (b₁ from a 400-point ψ table, b₀ = Φ⁻¹(μ)·√(1 + b₁²)).
91
+
92
+ | Parameter | Prior |
93
+ |---|---|
94
+ | μ | 0.3 (fixed) |
95
+ | ψ | U(0.2, 0.8) |
96
+ | β | U(−0.4, 0.4) |
97
+
98
+ Nuisances with γ(x) = Φ(b₀ + b₁x): e(x) = L(x), mD(x,0) = (1 − γ)/2, mD(x,1) = γ + (1 − γ)/2, mY(x,z) = 0.5 − β/2 + β mD(x,z). LATE = β.
99
+
100
+ ## Notes
101
+
102
+ - About 1% of tables have a very weak instrument (first-stage difference below 0.05); they are kept and dominate the RMSE of any estimator.
103
+ - In the Kennedy design e(x) runs from about 0.04 to 0.96 over the observed range of X; learners whose propensity estimates reach exactly 0 or 1 (for example untrimmed random forests) fail on it unless the propensity is clipped.
104
+ - The Ding tables have no covariates, so their nuisances are constants and the LATE reduces to the Wald ratio.
105
+ - Everything is simulated from the equations above; no real data is involved.