@@ -40,7 +40,7 @@ def test_did_validation_post_treatment_formula():
40
40
)
41
41
42
42
with pytest .raises (FormulaException ):
43
- _ = cp .pymc_experiments . DifferenceInDifferences (
43
+ _ = cp .DifferenceInDifferences (
44
44
df ,
45
45
formula = "y ~ 1 + group*post_SOMETHING" ,
46
46
time_variable_name = "t" ,
@@ -49,7 +49,7 @@ def test_did_validation_post_treatment_formula():
49
49
)
50
50
51
51
with pytest .raises (FormulaException ):
52
- _ = cp .skl_experiments . DifferenceInDifferences (
52
+ _ = cp .DifferenceInDifferences (
53
53
df ,
54
54
formula = "y ~ 1 + group*post_SOMETHING" ,
55
55
time_variable_name = "t" ,
@@ -73,7 +73,7 @@ def test_did_validation_post_treatment_data():
73
73
)
74
74
75
75
with pytest .raises (DataException ):
76
- _ = cp .pymc_experiments . DifferenceInDifferences (
76
+ _ = cp .DifferenceInDifferences (
77
77
df ,
78
78
formula = "y ~ 1 + group*post_treatment" ,
79
79
time_variable_name = "t" ,
@@ -82,7 +82,7 @@ def test_did_validation_post_treatment_data():
82
82
)
83
83
84
84
with pytest .raises (DataException ):
85
- _ = cp .skl_experiments . DifferenceInDifferences (
85
+ _ = cp .DifferenceInDifferences (
86
86
df ,
87
87
formula = "y ~ 1 + group*post_treatment" ,
88
88
time_variable_name = "t" ,
@@ -106,7 +106,7 @@ def test_did_validation_unit_data():
106
106
)
107
107
108
108
with pytest .raises (DataException ):
109
- _ = cp .pymc_experiments . DifferenceInDifferences (
109
+ _ = cp .DifferenceInDifferences (
110
110
df ,
111
111
formula = "y ~ 1 + group*post_treatment" ,
112
112
time_variable_name = "t" ,
@@ -115,7 +115,7 @@ def test_did_validation_unit_data():
115
115
)
116
116
117
117
with pytest .raises (DataException ):
118
- _ = cp .skl_experiments . DifferenceInDifferences (
118
+ _ = cp .DifferenceInDifferences (
119
119
df ,
120
120
formula = "y ~ 1 + group*post_treatment" ,
121
121
time_variable_name = "t" ,
@@ -139,7 +139,7 @@ def test_did_validation_group_dummy_coded():
139
139
)
140
140
141
141
with pytest .raises (DataException ):
142
- _ = cp .pymc_experiments . DifferenceInDifferences (
142
+ _ = cp .DifferenceInDifferences (
143
143
df ,
144
144
formula = "y ~ 1 + group*post_treatment" ,
145
145
time_variable_name = "t" ,
@@ -148,7 +148,7 @@ def test_did_validation_group_dummy_coded():
148
148
)
149
149
150
150
with pytest .raises (DataException ):
151
- _ = cp .skl_experiments . DifferenceInDifferences (
151
+ _ = cp .DifferenceInDifferences (
152
152
df ,
153
153
formula = "y ~ 1 + group*post_treatment" ,
154
154
time_variable_name = "t" ,
@@ -168,7 +168,7 @@ def test_sc_input_error():
168
168
with pytest .raises (BadIndexException ):
169
169
df = cp .load_data ("sc" )
170
170
treatment_time = pd .to_datetime ("2016 June 24" )
171
- _ = cp .pymc_experiments . SyntheticControl (
171
+ _ = cp .SyntheticControl (
172
172
df ,
173
173
treatment_time ,
174
174
formula = "actual ~ 0 + a + b + c + d + e + f + g" ,
@@ -178,7 +178,7 @@ def test_sc_input_error():
178
178
with pytest .raises (BadIndexException ):
179
179
df = cp .load_data ("sc" )
180
180
treatment_time = pd .to_datetime ("2016 June 24" )
181
- _ = cp .skl_experiments . SyntheticControl (
181
+ _ = cp .SyntheticControl (
182
182
df ,
183
183
treatment_time ,
184
184
formula = "actual ~ 0 + a + b + c + d + e + f + g" ,
@@ -202,7 +202,7 @@ def test_sc_brexit_input_error():
202
202
all_countries = list (all_countries )
203
203
other_countries = list (other_countries )
204
204
formula = target_country + " ~ " + "0 + " + " + " .join (other_countries )
205
- _ = cp .pymc_experiments . SyntheticControl (
205
+ _ = cp .SyntheticControl (
206
206
df ,
207
207
treatment_time ,
208
208
formula = formula ,
@@ -224,7 +224,7 @@ def test_ancova_validation_2_levels():
224
224
)
225
225
226
226
with pytest .raises (DataException ):
227
- _ = cp .pymc_experiments . PrePostNEGD (
227
+ _ = cp .PrePostNEGD (
228
228
df ,
229
229
formula = "post ~ 1 + C(group) + pre" ,
230
230
group_variable_name = "group" ,
@@ -247,7 +247,7 @@ def test_rd_validation_treated_in_formula():
247
247
)
248
248
249
249
with pytest .raises (FormulaException ):
250
- _ = cp .pymc_experiments . RegressionDiscontinuity (
250
+ _ = cp .RegressionDiscontinuity (
251
251
df ,
252
252
formula = "y ~ 1 + x" ,
253
253
model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -257,7 +257,7 @@ def test_rd_validation_treated_in_formula():
257
257
with pytest .raises (FormulaException ):
258
258
from sklearn .linear_model import LinearRegression
259
259
260
- _ = cp .skl_experiments . RegressionDiscontinuity (
260
+ _ = cp .RegressionDiscontinuity (
261
261
df ,
262
262
formula = "y ~ 1 + x" ,
263
263
model = LinearRegression (),
@@ -276,7 +276,7 @@ def test_rd_validation_treated_is_dummy():
276
276
)
277
277
278
278
with pytest .raises (DataException ):
279
- _ = cp .pymc_experiments . RegressionDiscontinuity (
279
+ _ = cp .RegressionDiscontinuity (
280
280
df ,
281
281
formula = "y ~ 1 + x + treated" ,
282
282
model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -286,7 +286,7 @@ def test_rd_validation_treated_is_dummy():
286
286
from sklearn .linear_model import LinearRegression
287
287
288
288
with pytest .raises (DataException ):
289
- _ = cp .skl_experiments . RegressionDiscontinuity (
289
+ _ = cp .RegressionDiscontinuity (
290
290
df ,
291
291
formula = "y ~ 1 + x + treated" ,
292
292
model = LinearRegression (),
@@ -302,7 +302,7 @@ def test_iv_treatment_var_is_present():
302
302
instruments_data = pd .DataFrame ({"z" : [1 , 3 , 4 ], "w" : [2 , 3 , 4 ]})
303
303
304
304
with pytest .raises (DataException ):
305
- _ = cp .pymc_experiments . InstrumentalVariable (
305
+ _ = cp .InstrumentalVariable (
306
306
instruments_data = instruments_data ,
307
307
data = data ,
308
308
instruments_formula = instruments_formula ,
@@ -347,7 +347,7 @@ def test_rkink_bandwidth_check():
347
347
with pytest .raises (ValueError ):
348
348
kink = 0.5
349
349
df = setup_regression_kink_data (kink )
350
- _ = cp .pymc_experiments . RegressionKink (
350
+ _ = cp .RegressionKink (
351
351
df ,
352
352
formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
353
353
model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -358,7 +358,7 @@ def test_rkink_bandwidth_check():
358
358
with pytest .raises (ValueError ):
359
359
kink = 0.5
360
360
df = setup_regression_kink_data (kink )
361
- _ = cp .pymc_experiments . RegressionKink (
361
+ _ = cp .RegressionKink (
362
362
df ,
363
363
formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
364
364
model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -372,7 +372,7 @@ def test_rkink_epsilon_check():
372
372
with pytest .raises (ValueError ):
373
373
kink = 0.5
374
374
df = setup_regression_kink_data (kink )
375
- _ = cp .pymc_experiments . RegressionKink (
375
+ _ = cp .RegressionKink (
376
376
df ,
377
377
formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
378
378
model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -383,7 +383,7 @@ def test_rkink_epsilon_check():
383
383
with pytest .raises (ValueError ):
384
384
kink = 0.5
385
385
df = setup_regression_kink_data (kink )
386
- _ = cp .pymc_experiments . RegressionKink (
386
+ _ = cp .RegressionKink (
387
387
df ,
388
388
formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
389
389
model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
0 commit comments