Skip to content

Commit 683e6c5

Browse files
authored
Merge pull request #65 from CITCOM-project/remove-print-statements-from-estimators
Removed print statements
2 parents 2ebf675 + 8637a88 commit 683e6c5

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

causal_testing/testing/estimators.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ def estimate_ate(self) -> tuple[float, list[float, float], float]:
167167
:return: The average treatment effect and the 95% Wald confidence intervals.
168168
"""
169169
model = self._run_linear_regression()
170-
print(model.summary())
171170
# Create an empty individual for the control and treated
172171
individuals = pd.DataFrame(1, index=['control', 'treated'], columns=model.params.index)
173172
individuals.loc['control', list(self.treatment)] = self.control_values
@@ -257,7 +256,6 @@ def estimate_cates(self) -> tuple[float, list[float, float]]:
257256
x[f"{a}*{b}"] = x[a] * x[b]
258257

259258
model = self._run_linear_regression()
260-
print(model.summary())
261259
y = model.predict(x)
262260
treatment_outcome = y.iloc[0]
263261
control_outcome = y.iloc[1]
@@ -338,7 +336,6 @@ def estimate_ate(self) -> float:
338336
model.fit(outcome_df, treatment_df, X=effect_modifier_df, W=confounders_df)
339337

340338
# Obtain the ATE and 95% confidence intervals
341-
print(dir(model))
342339
ate = model.ate(effect_modifier_df, T0=self.control_values, T1=self.treatment_values)
343340
ate_interval = model.ate_interval(effect_modifier_df, T0=self.control_values, T1=self.treatment_values)
344341
ci_low, ci_high = ate_interval[0], ate_interval[1]

examples/covasim_/vaccinating_elderly/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ the elderly should cause vaccines and vaccinated to decrease (more restrictive p
77
are vaccinated), and no change to the maximum doses since this should always be 2.
88

99
This case study directly executes Covasim under two input configurations that differ only in their vaccine input: one
10-
is the default Pfizer vaccine, the other is the same vaccine but additionally sub-targeting the elderly using a method
10+
is the default Pfizer vaccine, the other is the same vaccine but additionally sub-targeting the elderly using a method
1111
provided in the Covasim vaccine tutorial. We execute each of these input configurations 30 times and repeat this for
1212
four test cases: one focusing on each of the four previously mentioned outputs.
1313

@@ -17,9 +17,9 @@ Further details are provided in Section 5.3 (Prioritising the elderly for vaccin
1717
To run this case study:
1818
1. Ensure all project dependencies are installed by running `pip install .` from the top
1919
level of this directory (instructions are provided in the project README).
20-
2. Additionally, in order to run Covasim, install version 3.07 by running `pip install covasim==3.0.7`.
20+
2. Additionally, in order to run Covasim, install version 3.0.7 by running `pip install covasim==3.0.7`.
2121
3. Change directory to `causal_testing/examples/covasim_/vaccinating_elderly`.
2222
4. Run the command `python causal_test_vaccine.py`.
2323

2424
This will run Covasim as described above and print out the causal test results for the effect of each input on each
25-
output.
25+
output.

0 commit comments

Comments
 (0)