Skip to content

Commit 3bb81a7

Browse files
authored
Merge pull request #302 from anevolbap/issue_299-summary-did
Fix #299: Rounding issue for DiD results.
2 parents 6043b9e + 42018ca commit 3bb81a7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

causalpy/pymc_experiments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def summary(self, round_to=None) -> None:
709709
print(f"{self.expt_type:=^80}")
710710
print(f"Formula: {self.formula}")
711711
print("\nResults:")
712-
print(round_num(self._causal_impact_summary_stat(), round_to))
712+
print(self._causal_impact_summary_stat(round_to))
713713
self.print_coefficients(round_to)
714714

715715

causalpy/tests/test_pymc_experiments.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ def test_did_summary():
1717
group_variable_name="group",
1818
model=cp.pymc_models.LinearRegression(sample_kwargs=sample_kwargs),
1919
)
20-
print(type(result._causal_impact_summary_stat()))
21-
assert isinstance(result._causal_impact_summary_stat(), str)
20+
round_to = None
21+
print(type(result._causal_impact_summary_stat(round_to)))
22+
print(result._causal_impact_summary_stat(round_to))
23+
assert isinstance(result._causal_impact_summary_stat(round_to), str)
2224

2325

2426
def test_regression_kink_gradient_change():

0 commit comments

Comments
 (0)