Skip to content

Commit e011c9d

Browse files
authored
Merge pull request #72 from pymc-labs/RDD-drinking-age
improvements to RDD / drinking example
2 parents cc3be37 + 4392539 commit e011c9d

File tree

2 files changed

+826
-418
lines changed

2 files changed

+826
-418
lines changed

causalpy/pymc_experiments.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,24 @@ class RegressionDiscontinuity(ExperimentalDesign):
327327
"""
328328
A class to analyse regression discontinuity experiments.
329329
330+
:param data: A pandas dataframe
331+
:param formula: A statistical model formula
332+
:param treatment_threshold: A scalar threshold value at which the treatment is applied
333+
:param prediction_model: A PyMC model
334+
:param running_variable_name: The name of the predictor variable that the treatment threshold is based upon
335+
330336
.. note::
331337
332338
There is no pre/post intervention data distinction for the regression discontinuity design, we fit all the data available.
333339
"""
334340

335341
def __init__(
336342
self,
337-
data,
338-
formula,
339-
treatment_threshold,
343+
data: pd.DataFrame,
344+
formula: str,
345+
treatment_threshold: float,
340346
prediction_model=None,
341-
running_variable_name="x",
347+
running_variable_name: str = "x",
342348
outcome_variable_name="y",
343349
**kwargs,
344350
):

docs/notebooks/rd_pymc_drinking.ipynb

Lines changed: 816 additions & 414 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)