Skip to content

Commit 5742985

Browse files
committed
update: example DAFNI test and results
1 parent 4a34334 commit 5742985

File tree

2 files changed

+31
-181
lines changed

2 files changed

+31
-181
lines changed

dafni/data/inputs/causal_tests.json

Lines changed: 6 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,11 @@
11
{
22
"tests": [
3-
{
4-
"name": "max_doses _||_ cum_vaccinations",
5-
"estimator": "LinearRegressionEstimator",
6-
"estimate_type": "coefficient",
7-
"effect": "direct",
8-
"mutations": [
9-
"max_doses"
10-
],
11-
"expected_effect": {
12-
"cum_vaccinations": "NoEffect"
13-
},
14-
"formula": "cum_vaccinations ~ max_doses",
15-
"alpha": 0.05,
16-
"skip": false
17-
},
18-
{
19-
"name": "max_doses _||_ cum_vaccinated",
20-
"estimator": "LinearRegressionEstimator",
21-
"estimate_type": "coefficient",
22-
"effect": "direct",
23-
"mutations": [
24-
"max_doses"
25-
],
26-
"expected_effect": {
27-
"cum_vaccinated": "NoEffect"
28-
},
29-
"formula": "cum_vaccinated ~ max_doses",
30-
"alpha": 0.05,
31-
"skip": false
32-
},
33-
{
34-
"name": "max_doses _||_ cum_infections",
35-
"estimator": "LinearRegressionEstimator",
36-
"estimate_type": "coefficient",
37-
"effect": "direct",
38-
"mutations": [
39-
"max_doses"
40-
],
41-
"expected_effect": {
42-
"cum_infections": "NoEffect"
43-
},
44-
"formula": "cum_infections ~ max_doses",
45-
"alpha": 0.05,
46-
"skip": false
47-
},
483
{
494
"name": "vaccine --> cum_vaccinations",
505
"estimator": "LinearRegressionEstimator",
516
"estimate_type": "coefficient",
527
"effect": "direct",
53-
"mutations": [
54-
"vaccine"
55-
],
8+
"treatment_variable": "vaccine",
569
"expected_effect": {
5710
"cum_vaccinations": "SomeEffect"
5811
},
@@ -64,9 +17,7 @@
6417
"estimator": "LinearRegressionEstimator",
6518
"estimate_type": "coefficient",
6619
"effect": "direct",
67-
"mutations": [
68-
"vaccine"
69-
],
20+
"treatment_variable": "vaccine",
7021
"expected_effect": {
7122
"cum_vaccinated": "SomeEffect"
7223
},
@@ -78,9 +29,7 @@
7829
"estimator": "LinearRegressionEstimator",
7930
"estimate_type": "coefficient",
8031
"effect": "direct",
81-
"mutations": [
82-
"vaccine"
83-
],
32+
"treatment_variable": "vaccine",
8433
"expected_effect": {
8534
"cum_infections": "SomeEffect"
8635
},
@@ -92,9 +41,7 @@
9241
"estimator": "LinearRegressionEstimator",
9342
"estimate_type": "coefficient",
9443
"effect": "direct",
95-
"mutations": [
96-
"cum_vaccinations"
97-
],
44+
"treatment_variable": "cum_vaccinations",
9845
"expected_effect": {
9946
"cum_vaccinated": "NoEffect"
10047
},
@@ -107,9 +54,7 @@
10754
"estimator": "LinearRegressionEstimator",
10855
"estimate_type": "coefficient",
10956
"effect": "direct",
110-
"mutations": [
111-
"cum_vaccinations"
112-
],
57+
"treatment_variable": "cum_vaccinations",
11358
"expected_effect": {
11459
"cum_infections": "NoEffect"
11560
},
@@ -122,9 +67,7 @@
12267
"estimator": "LinearRegressionEstimator",
12368
"estimate_type": "coefficient",
12469
"effect": "direct",
125-
"mutations": [
126-
"cum_vaccinated"
127-
],
70+
"treatment_variable": "cum_vaccinated",
12871
"expected_effect": {
12972
"cum_infections": "NoEffect"
13073
},
Lines changed: 25 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,16 @@
11
[
2-
{
3-
"name": "max_doses _||_ cum_vaccinations",
4-
"estimate_type": "coefficient",
5-
"effect": "direct",
6-
"mutations": [
7-
"max_doses"
8-
],
9-
"expected_effect": {
10-
"cum_vaccinations": "NoEffect"
11-
},
12-
"formula": "cum_vaccinations ~ max_doses",
13-
"alpha": 0.05,
14-
"skip": false,
15-
"failed": true,
16-
"result": {
17-
"treatment": "max_doses",
18-
"outcome": "cum_vaccinations",
19-
"adjustment_set": [],
20-
"effect_measure": "coefficient",
21-
"effect_estimate": {
22-
"max_doses": 252628.1066666667
23-
},
24-
"ci_low": [
25-
252271.33332001517
26-
],
27-
"ci_high": [
28-
252984.8800133182
29-
]
30-
}
31-
},
32-
{
33-
"name": "max_doses _||_ cum_vaccinated",
34-
"estimate_type": "coefficient",
35-
"effect": "direct",
36-
"mutations": [
37-
"max_doses"
38-
],
39-
"expected_effect": {
40-
"cum_vaccinated": "NoEffect"
41-
},
42-
"formula": "cum_vaccinated ~ max_doses",
43-
"alpha": 0.05,
44-
"skip": false,
45-
"failed": true,
46-
"result": {
47-
"treatment": "max_doses",
48-
"outcome": "cum_vaccinated",
49-
"adjustment_set": [],
50-
"effect_measure": "coefficient",
51-
"effect_estimate": {
52-
"max_doses": 213111.93333333335
53-
},
54-
"ci_low": [
55-
212755.15056812647
56-
],
57-
"ci_high": [
58-
213468.71609854023
59-
]
60-
}
61-
},
62-
{
63-
"name": "max_doses _||_ cum_infections",
64-
"estimate_type": "coefficient",
65-
"effect": "direct",
66-
"mutations": [
67-
"max_doses"
68-
],
69-
"expected_effect": {
70-
"cum_infections": "NoEffect"
71-
},
72-
"formula": "cum_infections ~ max_doses",
73-
"alpha": 0.05,
74-
"skip": false,
75-
"failed": true,
76-
"result": {
77-
"treatment": "max_doses",
78-
"outcome": "cum_infections",
79-
"adjustment_set": [],
80-
"effect_measure": "coefficient",
81-
"effect_estimate": {
82-
"max_doses": 2666.3066666666664
83-
},
84-
"ci_low": [
85-
2619.972040648758
86-
],
87-
"ci_high": [
88-
2712.6412926845746
89-
]
90-
}
91-
},
922
{
933
"name": "vaccine --> cum_vaccinations",
944
"estimate_type": "coefficient",
955
"effect": "direct",
96-
"mutations": [
97-
"vaccine"
98-
],
6+
"treatment_variable": "vaccine",
997
"expected_effect": {
1008
"cum_vaccinations": "SomeEffect"
1019
},
10210
"formula": "cum_vaccinations ~ vaccine",
11+
"alpha": 0.05,
10312
"skip": false,
104-
"failed": false,
13+
"passed": true,
10514
"result": {
10615
"treatment": "vaccine",
10716
"outcome": "cum_vaccinations",
@@ -122,15 +31,14 @@
12231
"name": "vaccine --> cum_vaccinated",
12332
"estimate_type": "coefficient",
12433
"effect": "direct",
125-
"mutations": [
126-
"vaccine"
127-
],
34+
"treatment_variable": "vaccine",
12835
"expected_effect": {
12936
"cum_vaccinated": "SomeEffect"
13037
},
13138
"formula": "cum_vaccinated ~ vaccine",
39+
"alpha": 0.05,
13240
"skip": false,
133-
"failed": false,
41+
"passed": true,
13442
"result": {
13543
"treatment": "vaccine",
13644
"outcome": "cum_vaccinated",
@@ -151,15 +59,14 @@
15159
"name": "vaccine --> cum_infections",
15260
"estimate_type": "coefficient",
15361
"effect": "direct",
154-
"mutations": [
155-
"vaccine"
156-
],
62+
"treatment_variable": "vaccine",
15763
"expected_effect": {
15864
"cum_infections": "SomeEffect"
15965
},
16066
"formula": "cum_infections ~ vaccine",
67+
"alpha": 0.05,
16168
"skip": false,
162-
"failed": false,
69+
"passed": true,
16370
"result": {
16471
"treatment": "vaccine",
16572
"outcome": "cum_infections",
@@ -180,20 +87,20 @@
18087
"name": "cum_vaccinations _||_ cum_vaccinated | ['vaccine']",
18188
"estimate_type": "coefficient",
18289
"effect": "direct",
183-
"mutations": [
184-
"cum_vaccinations"
185-
],
90+
"treatment_variable": "cum_vaccinations",
18691
"expected_effect": {
18792
"cum_vaccinated": "NoEffect"
18893
},
18994
"formula": "cum_vaccinated ~ cum_vaccinations + vaccine",
19095
"alpha": 0.05,
19196
"skip": false,
192-
"failed": true,
97+
"passed": false,
19398
"result": {
19499
"treatment": "cum_vaccinations",
195100
"outcome": "cum_vaccinated",
196-
"adjustment_set": [],
101+
"adjustment_set": [
102+
"vaccine"
103+
],
197104
"effect_measure": "coefficient",
198105
"effect_estimate": {
199106
"cum_vaccinations": 0.9998656401531605
@@ -210,20 +117,20 @@
210117
"name": "cum_vaccinations _||_ cum_infections | ['vaccine']",
211118
"estimate_type": "coefficient",
212119
"effect": "direct",
213-
"mutations": [
214-
"cum_vaccinations"
215-
],
120+
"treatment_variable": "cum_vaccinations",
216121
"expected_effect": {
217122
"cum_infections": "NoEffect"
218123
},
219124
"formula": "cum_infections ~ cum_vaccinations + vaccine",
220125
"alpha": 0.05,
221126
"skip": false,
222-
"failed": false,
127+
"passed": true,
223128
"result": {
224129
"treatment": "cum_vaccinations",
225130
"outcome": "cum_infections",
226-
"adjustment_set": [],
131+
"adjustment_set": [
132+
"vaccine"
133+
],
227134
"effect_measure": "coefficient",
228135
"effect_estimate": {
229136
"cum_vaccinations": -0.006416682407515084
@@ -240,20 +147,20 @@
240147
"name": "cum_vaccinated _||_ cum_infections | ['vaccine']",
241148
"estimate_type": "coefficient",
242149
"effect": "direct",
243-
"mutations": [
244-
"cum_vaccinated"
245-
],
150+
"treatment_variable": "cum_vaccinated",
246151
"expected_effect": {
247152
"cum_infections": "NoEffect"
248153
},
249154
"formula": "cum_infections ~ cum_vaccinated + vaccine",
250155
"alpha": 0.05,
251156
"skip": false,
252-
"failed": false,
157+
"passed": true,
253158
"result": {
254159
"treatment": "cum_vaccinated",
255160
"outcome": "cum_infections",
256-
"adjustment_set": [],
161+
"adjustment_set": [
162+
"vaccine"
163+
],
257164
"effect_measure": "coefficient",
258165
"effect_estimate": {
259166
"cum_vaccinated": -0.006176900588291234
@@ -266,4 +173,4 @@
266173
]
267174
}
268175
}
269-
]
176+
]

0 commit comments

Comments
 (0)