Skip to content

Commit 6d6ad7c

Browse files
Fix typo and add blank effect_modifiers list
1 parent beda221 commit 6d6ad7c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

causal_testing/testing/estimators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def __init__(
105105
super().__init__(treatment, treatment_value, control_value, adjustment_set, outcome, df, effect_modifiers,
106106
alpha=alpha)
107107

108+
if effect_modifiers is None:
109+
effect_modifiers = []
110+
108111
if formula is not None:
109112
self.formula = formula
110113

@@ -121,7 +124,7 @@ def add_modelling_assumptions(self):
121124

122125
def get_terms_from_formula(self):
123126
desc = ModelDesc.from_formula(self.formula)
124-
if len(desc.lhs_termlist > 1):
127+
if len(desc.lhs_termlist) > 1:
125128
raise ValueError("More than 1 left hand side term provided in formula, only single term is accepted")
126129
outcome = desc.lhs_termlist[0].factors[0].code
127130
rhs_terms = set()
@@ -346,6 +349,7 @@ def __init__(
346349
alpha: float = 0.05,
347350

348351
):
352+
349353
super().__init__(
350354
treatment, treatment_value, control_value, adjustment_set, outcome, df, effect_modifiers, alpha=alpha,
351355
formula=formula

0 commit comments

Comments
 (0)