Skip to content

Commit ea2ed69

Browse files
committed
updates to FormulaException wording
1 parent 7891dd8 commit ea2ed69

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

causalpy/experiments/diff_in_diff.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,14 @@ def _validate_formula_interaction_terms(self):
287287
total_indicators >= 2
288288
): # 3 or more variables (e.g., a*b*c or a:b:c has 2 symbols)
289289
raise FormulaException(
290-
f"Formula contains interaction term with more than 2 variables: {term}. Only two-way interactions are allowed."
290+
f"Formula contains interaction term with more than 2 variables: {term}. "
291+
"Three-way or higher-order interactions are not supported as they complicate interpretation of the causal effect."
291292
)
292293

293294
if len(interaction_terms) > 1:
294295
raise FormulaException(
295-
f"Formula contains {len(interaction_terms)} interaction terms: {interaction_terms}. Multiple interaction terms are not currently supported."
296+
f"Formula contains {len(interaction_terms)} interaction terms: {interaction_terms}. "
297+
"Multiple interaction terms are not currently supported as they complicate interpretation of the causal effect."
296298
)
297299

298300
def summary(self, round_to=None) -> None:

0 commit comments

Comments
 (0)