Skip to content

Commit 8805fb2

Browse files
committed
make doctests pass in pymc_experiments.py #323
1 parent 44393bb commit 8805fb2

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

causalpy/pymc_experiments.py

+36
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ def print_coefficients(self, round_to=None) -> None:
9999
... "progressbar": False
100100
... }),
101101
... )
102+
<BLANKLINE>
103+
<BLANKLINE>
104+
<BLANKLINE>
105+
<BLANKLINE>
106+
<BLANKLINE>
102107
>>> result.print_coefficients(round_to=1) # doctest: +NUMBER
103108
Model coefficients:
104109
Intercept 1, 94% HDI [1, 1]
@@ -157,6 +162,11 @@ class PrePostFit(ExperimentalDesign, PrePostFitDataValidator):
157162
... }
158163
... ),
159164
... )
165+
<BLANKLINE>
166+
<BLANKLINE>
167+
<BLANKLINE>
168+
<BLANKLINE>
169+
<BLANKLINE>
160170
>>> result.summary(round_to=1) # doctest: +NUMBER
161171
==================================Pre-Post Fit==================================
162172
Formula: actual ~ 0 + a + g
@@ -383,6 +393,11 @@ class InterruptedTimeSeries(PrePostFit):
383393
... }
384394
... )
385395
... )
396+
<BLANKLINE>
397+
<BLANKLINE>
398+
<BLANKLINE>
399+
<BLANKLINE>
400+
<BLANKLINE>
386401
"""
387402

388403
expt_type = "Interrupted Time Series"
@@ -418,6 +433,11 @@ class SyntheticControl(PrePostFit):
418433
... }
419434
... ),
420435
... )
436+
<BLANKLINE>
437+
<BLANKLINE>
438+
<BLANKLINE>
439+
<BLANKLINE>
440+
<BLANKLINE>
421441
"""
422442

423443
expt_type = "Synthetic Control"
@@ -474,6 +494,11 @@ class DifferenceInDifferences(ExperimentalDesign, DiDDataValidator):
474494
... }
475495
... )
476496
... )
497+
<BLANKLINE>
498+
<BLANKLINE>
499+
<BLANKLINE>
500+
<BLANKLINE>
501+
<BLANKLINE>
477502
"""
478503

479504
def __init__(
@@ -765,6 +790,11 @@ class RegressionDiscontinuity(ExperimentalDesign, RDDataValidator):
765790
... ),
766791
... treatment_threshold=0.5,
767792
... )
793+
<BLANKLINE>
794+
<BLANKLINE>
795+
<BLANKLINE>
796+
<BLANKLINE>
797+
<BLANKLINE>
768798
"""
769799

770800
def __init__(
@@ -1174,6 +1204,10 @@ class PrePostNEGD(ExperimentalDesign, PrePostNEGDDataValidator):
11741204
... }
11751205
... )
11761206
... )
1207+
<BLANKLINE>
1208+
<BLANKLINE>
1209+
<BLANKLINE>
1210+
<BLANKLINE>
11771211
>>> result.summary(round_to=1) # doctest: +NUMBER
11781212
==================Pretest/posttest Nonequivalent Group Design===================
11791213
Formula: post ~ 1 + C(group) + pre
@@ -1404,6 +1438,8 @@ class InstrumentalVariable(ExperimentalDesign, IVDataValidator):
14041438
... formula=formula,
14051439
... model=InstrumentalVariableRegression(sample_kwargs=sample_kwargs),
14061440
... )
1441+
<BLANKLINE>
1442+
<BLANKLINE>
14071443
"""
14081444

14091445
def __init__(

0 commit comments

Comments
 (0)