@@ -15,8 +15,8 @@ class TestIPCWEstimator(unittest.TestCase):
15
15
16
16
def test_estimate_hazard_ratio (self ):
17
17
timesteps_per_intervention = 1
18
- control_strategy = [( t , "t" , 0 ) for t in range (1 , 4 , timesteps_per_intervention )]
19
- treatment_strategy = [( t , "t" , 1 ) for t in range (1 , 4 , timesteps_per_intervention )]
18
+ control_strategy = [[ t , "t" , 0 ] for t in range (1 , 4 , timesteps_per_intervention )]
19
+ treatment_strategy = [[ t , "t" , 1 ] for t in range (1 , 4 , timesteps_per_intervention )]
20
20
outcome = "outcome"
21
21
fit_bl_switch_formula = "xo_t_do ~ time"
22
22
df = pd .read_csv ("tests/resources/data/temporal_data.csv" )
@@ -37,8 +37,8 @@ def test_estimate_hazard_ratio(self):
37
37
38
38
def test_invalid_treatment_strategies (self ):
39
39
timesteps_per_intervention = 1
40
- control_strategy = [( t , "t" , 0 ) for t in range (1 , 4 , timesteps_per_intervention )]
41
- treatment_strategy = [( t , "t" , 1 ) for t in range (1 , 4 , timesteps_per_intervention )]
40
+ control_strategy = [[ t , "t" , 0 ] for t in range (1 , 4 , timesteps_per_intervention )]
41
+ treatment_strategy = [[ t , "t" , 1 ] for t in range (1 , 4 , timesteps_per_intervention )]
42
42
outcome = "outcome"
43
43
fit_bl_switch_formula = "xo_t_do ~ time"
44
44
df = pd .read_csv ("tests/resources/data/temporal_data.csv" )
@@ -59,8 +59,8 @@ def test_invalid_treatment_strategies(self):
59
59
60
60
def test_invalid_fault_t_do (self ):
61
61
timesteps_per_intervention = 1
62
- control_strategy = [( t , "t" , 0 ) for t in range (1 , 4 , timesteps_per_intervention )]
63
- treatment_strategy = [( t , "t" , 1 ) for t in range (1 , 4 , timesteps_per_intervention )]
62
+ control_strategy = [[ t , "t" , 0 ] for t in range (1 , 4 , timesteps_per_intervention )]
63
+ treatment_strategy = [[ t , "t" , 1 ] for t in range (1 , 4 , timesteps_per_intervention )]
64
64
outcome = "outcome"
65
65
fit_bl_switch_formula = "xo_t_do ~ time"
66
66
df = pd .read_csv ("tests/resources/data/temporal_data.csv" )
0 commit comments