@@ -40,7 +40,7 @@ def test_did_validation_post_treatment_formula():
4040 )
4141
4242 with pytest .raises (FormulaException ):
43- _ = cp .pymc_experiments . DifferenceInDifferences (
43+ _ = cp .DifferenceInDifferences (
4444 df ,
4545 formula = "y ~ 1 + group*post_SOMETHING" ,
4646 time_variable_name = "t" ,
@@ -49,7 +49,7 @@ def test_did_validation_post_treatment_formula():
4949 )
5050
5151 with pytest .raises (FormulaException ):
52- _ = cp .skl_experiments . DifferenceInDifferences (
52+ _ = cp .DifferenceInDifferences (
5353 df ,
5454 formula = "y ~ 1 + group*post_SOMETHING" ,
5555 time_variable_name = "t" ,
@@ -73,7 +73,7 @@ def test_did_validation_post_treatment_data():
7373 )
7474
7575 with pytest .raises (DataException ):
76- _ = cp .pymc_experiments . DifferenceInDifferences (
76+ _ = cp .DifferenceInDifferences (
7777 df ,
7878 formula = "y ~ 1 + group*post_treatment" ,
7979 time_variable_name = "t" ,
@@ -82,7 +82,7 @@ def test_did_validation_post_treatment_data():
8282 )
8383
8484 with pytest .raises (DataException ):
85- _ = cp .skl_experiments . DifferenceInDifferences (
85+ _ = cp .DifferenceInDifferences (
8686 df ,
8787 formula = "y ~ 1 + group*post_treatment" ,
8888 time_variable_name = "t" ,
@@ -106,7 +106,7 @@ def test_did_validation_unit_data():
106106 )
107107
108108 with pytest .raises (DataException ):
109- _ = cp .pymc_experiments . DifferenceInDifferences (
109+ _ = cp .DifferenceInDifferences (
110110 df ,
111111 formula = "y ~ 1 + group*post_treatment" ,
112112 time_variable_name = "t" ,
@@ -115,7 +115,7 @@ def test_did_validation_unit_data():
115115 )
116116
117117 with pytest .raises (DataException ):
118- _ = cp .skl_experiments . DifferenceInDifferences (
118+ _ = cp .DifferenceInDifferences (
119119 df ,
120120 formula = "y ~ 1 + group*post_treatment" ,
121121 time_variable_name = "t" ,
@@ -139,7 +139,7 @@ def test_did_validation_group_dummy_coded():
139139 )
140140
141141 with pytest .raises (DataException ):
142- _ = cp .pymc_experiments . DifferenceInDifferences (
142+ _ = cp .DifferenceInDifferences (
143143 df ,
144144 formula = "y ~ 1 + group*post_treatment" ,
145145 time_variable_name = "t" ,
@@ -148,7 +148,7 @@ def test_did_validation_group_dummy_coded():
148148 )
149149
150150 with pytest .raises (DataException ):
151- _ = cp .skl_experiments . DifferenceInDifferences (
151+ _ = cp .DifferenceInDifferences (
152152 df ,
153153 formula = "y ~ 1 + group*post_treatment" ,
154154 time_variable_name = "t" ,
@@ -168,7 +168,7 @@ def test_sc_input_error():
168168 with pytest .raises (BadIndexException ):
169169 df = cp .load_data ("sc" )
170170 treatment_time = pd .to_datetime ("2016 June 24" )
171- _ = cp .pymc_experiments . SyntheticControl (
171+ _ = cp .SyntheticControl (
172172 df ,
173173 treatment_time ,
174174 formula = "actual ~ 0 + a + b + c + d + e + f + g" ,
@@ -178,7 +178,7 @@ def test_sc_input_error():
178178 with pytest .raises (BadIndexException ):
179179 df = cp .load_data ("sc" )
180180 treatment_time = pd .to_datetime ("2016 June 24" )
181- _ = cp .skl_experiments . SyntheticControl (
181+ _ = cp .SyntheticControl (
182182 df ,
183183 treatment_time ,
184184 formula = "actual ~ 0 + a + b + c + d + e + f + g" ,
@@ -202,7 +202,7 @@ def test_sc_brexit_input_error():
202202 all_countries = list (all_countries )
203203 other_countries = list (other_countries )
204204 formula = target_country + " ~ " + "0 + " + " + " .join (other_countries )
205- _ = cp .pymc_experiments . SyntheticControl (
205+ _ = cp .SyntheticControl (
206206 df ,
207207 treatment_time ,
208208 formula = formula ,
@@ -224,7 +224,7 @@ def test_ancova_validation_2_levels():
224224 )
225225
226226 with pytest .raises (DataException ):
227- _ = cp .pymc_experiments . PrePostNEGD (
227+ _ = cp .PrePostNEGD (
228228 df ,
229229 formula = "post ~ 1 + C(group) + pre" ,
230230 group_variable_name = "group" ,
@@ -247,7 +247,7 @@ def test_rd_validation_treated_in_formula():
247247 )
248248
249249 with pytest .raises (FormulaException ):
250- _ = cp .pymc_experiments . RegressionDiscontinuity (
250+ _ = cp .RegressionDiscontinuity (
251251 df ,
252252 formula = "y ~ 1 + x" ,
253253 model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -257,7 +257,7 @@ def test_rd_validation_treated_in_formula():
257257 with pytest .raises (FormulaException ):
258258 from sklearn .linear_model import LinearRegression
259259
260- _ = cp .skl_experiments . RegressionDiscontinuity (
260+ _ = cp .RegressionDiscontinuity (
261261 df ,
262262 formula = "y ~ 1 + x" ,
263263 model = LinearRegression (),
@@ -276,7 +276,7 @@ def test_rd_validation_treated_is_dummy():
276276 )
277277
278278 with pytest .raises (DataException ):
279- _ = cp .pymc_experiments . RegressionDiscontinuity (
279+ _ = cp .RegressionDiscontinuity (
280280 df ,
281281 formula = "y ~ 1 + x + treated" ,
282282 model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -286,7 +286,7 @@ def test_rd_validation_treated_is_dummy():
286286 from sklearn .linear_model import LinearRegression
287287
288288 with pytest .raises (DataException ):
289- _ = cp .skl_experiments . RegressionDiscontinuity (
289+ _ = cp .RegressionDiscontinuity (
290290 df ,
291291 formula = "y ~ 1 + x + treated" ,
292292 model = LinearRegression (),
@@ -302,7 +302,7 @@ def test_iv_treatment_var_is_present():
302302 instruments_data = pd .DataFrame ({"z" : [1 , 3 , 4 ], "w" : [2 , 3 , 4 ]})
303303
304304 with pytest .raises (DataException ):
305- _ = cp .pymc_experiments . InstrumentalVariable (
305+ _ = cp .InstrumentalVariable (
306306 instruments_data = instruments_data ,
307307 data = data ,
308308 instruments_formula = instruments_formula ,
@@ -347,7 +347,7 @@ def test_rkink_bandwidth_check():
347347 with pytest .raises (ValueError ):
348348 kink = 0.5
349349 df = setup_regression_kink_data (kink )
350- _ = cp .pymc_experiments . RegressionKink (
350+ _ = cp .RegressionKink (
351351 df ,
352352 formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
353353 model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -358,7 +358,7 @@ def test_rkink_bandwidth_check():
358358 with pytest .raises (ValueError ):
359359 kink = 0.5
360360 df = setup_regression_kink_data (kink )
361- _ = cp .pymc_experiments . RegressionKink (
361+ _ = cp .RegressionKink (
362362 df ,
363363 formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
364364 model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -372,7 +372,7 @@ def test_rkink_epsilon_check():
372372 with pytest .raises (ValueError ):
373373 kink = 0.5
374374 df = setup_regression_kink_data (kink )
375- _ = cp .pymc_experiments . RegressionKink (
375+ _ = cp .RegressionKink (
376376 df ,
377377 formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
378378 model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
@@ -383,7 +383,7 @@ def test_rkink_epsilon_check():
383383 with pytest .raises (ValueError ):
384384 kink = 0.5
385385 df = setup_regression_kink_data (kink )
386- _ = cp .pymc_experiments . RegressionKink (
386+ _ = cp .RegressionKink (
387387 df ,
388388 formula = f"y ~ 1 + x + I((x-{ kink } )*treated)" ,
389389 model = cp .pymc_models .LinearRegression (sample_kwargs = sample_kwargs ),
0 commit comments