Skip to content

Commit b0b4539

Browse files
committed
tweaks
1 parent ea2b859 commit b0b4539

File tree

4 files changed

+22
-33
lines changed

4 files changed

+22
-33
lines changed

causalpy/tests/test_integration_pymc_examples.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def test_rd():
171171
172172
Loads data and checks:
173173
1. data is a dataframe
174-
2. pymc_experiments.RegressionDiscontinuity returns correct type
174+
2. causalpy.RegressionDiscontinuity returns correct type
175175
3. the correct number of MCMC chains exists in the posterior inference data
176176
4. the correct number of MCMC draws exists in the posterior inference data
177177
"""
@@ -200,7 +200,7 @@ def test_rd_bandwidth():
200200
201201
Loads data and checks:
202202
1. data is a dataframe
203-
2. pymc_experiments.RegressionDiscontinuity returns correct type
203+
2. causalpy.RegressionDiscontinuity returns correct type
204204
3. the correct number of MCMC chains exists in the posterior inference data
205205
4. the correct number of MCMC draws exists in the posterior inference data
206206
"""
@@ -230,7 +230,7 @@ def test_rd_drinking():
230230
231231
Loads data and checks:
232232
1. data is a dataframe
233-
2. pymc_experiments.RegressionDiscontinuity returns correct type
233+
2. causalpy.RegressionDiscontinuity returns correct type
234234
3. the correct number of MCMC chains exists in the posterior inference data
235235
4. the correct number of MCMC draws exists in the posterior inference data
236236
"""
@@ -290,7 +290,7 @@ def test_rkink():
290290
291291
Loads data and checks:
292292
1. data is a dataframe
293-
2. pymc_experiments.RegressionKink returns correct type
293+
2. causalpy.RegressionKink returns correct type
294294
3. the correct number of MCMC chains exists in the posterior inference data
295295
4. the correct number of MCMC draws exists in the posterior inference data
296296
"""
@@ -319,7 +319,7 @@ def test_rkink_bandwidth():
319319
320320
Generates synthetic data and checks:
321321
1. data is a dataframe
322-
2. pymc_experiments.RegressionKink returns correct type
322+
2. causalpy.RegressionKink returns correct type
323323
3. the correct number of MCMC chains exists in the posterior inference data
324324
4. the correct number of MCMC draws exists in the posterior inference data
325325
"""
@@ -349,7 +349,7 @@ def test_its():
349349
350350
Loads data and checks:
351351
1. data is a dataframe
352-
2. pymc_experiments.InterruptedTimeSeries returns correct type
352+
2. causalpy.InterruptedTimeSeries returns correct type
353353
3. the correct number of MCMC chains exists in the posterior inference data
354354
4. the correct number of MCMC draws exists in the posterior inference data
355355
"""
@@ -385,7 +385,7 @@ def test_its_covid():
385385
386386
Loads data and checks:
387387
1. data is a dataframe
388-
2. pymc_experiments.InterruptedtimeSeries returns correct type
388+
2. causalpy.InterruptedtimeSeries returns correct type
389389
3. the correct number of MCMC chains exists in the posterior inference data
390390
4. the correct number of MCMC draws exists in the posterior inference data
391391
"""
@@ -422,7 +422,7 @@ def test_sc():
422422
423423
Loads data and checks:
424424
1. data is a dataframe
425-
2. pymc_experiments.SyntheticControl returns correct type
425+
2. causalpy.SyntheticControl returns correct type
426426
3. the correct number of MCMC chains exists in the posterior inference data
427427
4. the correct number of MCMC draws exists in the posterior inference data
428428
"""
@@ -463,7 +463,7 @@ def test_sc_brexit():
463463
464464
Loads data and checks:
465465
1. data is a dataframe
466-
2. pymc_experiments.SyntheticControl returns correct type
466+
2. causalpy.SyntheticControl returns correct type
467467
3. the correct number of MCMC chains exists in the posterior inference data
468468
4. the correct number of MCMC draws exists in the posterior inference data
469469
"""
@@ -509,7 +509,7 @@ def test_ancova():
509509
510510
Loads data and checks:
511511
1. data is a dataframe
512-
2. pymc_experiments.PrePostNEGD returns correct type
512+
2. causalpy.PrePostNEGD returns correct type
513513
3. the correct number of MCMC chains exists in the posterior inference data
514514
4. the correct number of MCMC draws exists in the posterior inference data
515515
"""
@@ -541,7 +541,7 @@ def test_geolift1():
541541
542542
Loads data and checks:
543543
1. data is a dataframe
544-
2. pymc_experiments.SyntheticControl returns correct type
544+
2. causalpy.SyntheticControl returns correct type
545545
3. the correct number of MCMC chains exists in the posterior inference data
546546
4. the correct number of MCMC draws exists in the posterior inference data
547547
"""

causalpy/tests/test_pymc_experiments.py renamed to causalpy/tests/test_misc.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
"""
15-
Unit tests for pymc_experiments.py
15+
Miscellaneous unit tests
1616
"""
1717

1818
import arviz as az
@@ -24,22 +24,6 @@
2424
sample_kwargs = {"tune": 20, "draws": 20, "chains": 2, "cores": 2}
2525

2626

27-
def test_did_summary():
28-
"""Test that the summary stat function returns a string."""
29-
df = cp.load_data("did")
30-
result = cp.DifferenceInDifferences(
31-
df,
32-
formula="y ~ 1 + group*post_treatment",
33-
time_variable_name="t",
34-
group_variable_name="group",
35-
model=cp.pymc_models.LinearRegression(sample_kwargs=sample_kwargs),
36-
)
37-
round_to = None
38-
print(type(result._causal_impact_summary_stat(round_to)))
39-
print(result._causal_impact_summary_stat(round_to))
40-
assert isinstance(result._causal_impact_summary_stat(round_to), str)
41-
42-
4327
def test_regression_kink_gradient_change():
4428
"""Test function to numerically calculate the change in gradient around the kink
4529
point in regression kink designs"""

docs/source/_static/interrogate_badge.svg

Lines changed: 3 additions & 3 deletions
Loading

docs/source/api/index.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88
:toctree: generated/
99
1010
data
11-
pymc_experiments
1211
pymc_models
13-
skl_experiments
1412
skl_models
13+
experiments
14+
expt_diff_in_diff
15+
expt_instrumental_variable
16+
expt_prepostfit
17+
expt_prepostnegd
18+
expt_regression_discontinuity
19+
expt_regresion_kink
1520
```

0 commit comments

Comments
 (0)