Skip to content

Commit e4591db

Browse files
committed
Changing test_generalize for AIPSW confounder update
1 parent fe0db7f commit e4591db

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_generalize.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ def test_generalize_conf(self, df_iptw):
160160
aipw.weight_model('L + W_sq', print_results=False)
161161
aipw.outcome_model('A + L + L:A + W_sq + W_sq:A + W_sq:A:L', print_results=False)
162162
aipw.fit()
163-
npt.assert_allclose(aipw.risk_difference, 0.043744, atol=1e-5)
164-
npt.assert_allclose(aipw.risk_ratio, 1.131651, atol=1e-4)
163+
npt.assert_allclose(aipw.risk_difference, 0.048129, atol=1e-5)
164+
npt.assert_allclose(aipw.risk_ratio, 1.146787, atol=1e-4)
165165

166166
def test_transport_conf(self, df_iptw):
167-
aipw = AIPSW(df_iptw, exposure='A', outcome='Y', selection='S', generalize=True, weights='iptw')
167+
aipw = AIPSW(df_iptw, exposure='A', outcome='Y', selection='S', generalize=False, weights='iptw')
168168
aipw.weight_model('L + W_sq', print_results=False)
169169
aipw.outcome_model('A + L + L:A + W_sq + W_sq:A + W_sq:A:L', print_results=False)
170170
aipw.fit()
171-
npt.assert_allclose(aipw.risk_difference, 0.043744, atol=1e-5)
172-
npt.assert_allclose(aipw.risk_ratio, 1.131651, atol=1e-4)
171+
npt.assert_allclose(aipw.risk_difference, 0.041407, atol=1e-5)
172+
npt.assert_allclose(aipw.risk_ratio, 1.120556, atol=1e-4)

0 commit comments

Comments
 (0)