Skip to content

Commit 673165c

Browse files
committed
pylint
1 parent 2a7ce30 commit 673165c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

causal_testing/estimation/cubic_spline_estimator.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ def __init__(
4646
self.formula = f"{outcome} ~ cr({'+'.join(terms)}, df={basis})"
4747

4848
def estimate_ate_calculated(self, adjustment_config: dict = None) -> pd.Series:
49+
"""Estimate the ate effect of the treatment on the outcome. That is, the change in outcome caused
50+
by changing the treatment variable from the control value to the treatment value. Here, we actually
51+
calculate the expected outcomes under control and treatment and divide one by the other. This
52+
allows for custom terms to be put in such as squares, inverses, products, etc.
53+
54+
:param: adjustment_config: The configuration of the adjustment set as a dict mapping variable names to
55+
their values. N.B. Every variable in the adjustment set MUST have a value in
56+
order to estimate the outcome under control and treatment.
57+
58+
:return: The average treatment effect.
59+
"""
4960
model = self._run_regression()
5061

5162
x = {"Intercept": 1, self.treatment: self.treatment_value}

causal_testing/estimation/linear_regression_estimator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ def estimate_ate_calculated(self, adjustment_config: dict = None) -> tuple[pd.Se
178178
calculate the expected outcomes under control and treatment and divide one by the other. This
179179
allows for custom terms to be put in such as squares, inverses, products, etc.
180180
181+
:param: adjustment_config: The configuration of the adjustment set as a dict mapping variable names to
182+
their values. N.B. Every variable in the adjustment set MUST have a value in
183+
order to estimate the outcome under control and treatment.
184+
181185
:return: The average treatment effect and the 95% Wald confidence intervals.
182186
"""
183187
if adjustment_config is None:

0 commit comments

Comments
 (0)