Skip to content

Commit 1a0b078

Browse files
committed
Merge branch 'main' into pr/488
2 parents b57810a + 77f8d59 commit 1a0b078

File tree

3 files changed

+31
-33
lines changed

3 files changed

+31
-33
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.10", "3.11", "3.12"]
14+
python-version: ["3.11", "3.12", "3.13"]
1515

1616
steps:
1717
- uses: actions/checkout@v4

docs/source/index.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,50 @@ A Python package focussing on causal inference for quasi-experiments. The packag
1313
To get the latest release you can use pip:
1414

1515
```bash
16-
pip install CausalPy
16+
pip install CausalPy
1717
```
1818

1919
or conda:
2020

2121
```bash
22-
conda install causalpy -c conda-forge
22+
conda install causalpy -c conda-forge
2323
```
2424

2525
Alternatively, if you want the very latest version of the package you can install from GitHub:
2626

2727
```bash
28-
pip install git+https://github.com/pymc-labs/CausalPy.git
28+
pip install git+https://github.com/pymc-labs/CausalPy.git
2929
```
3030

3131
## Quickstart
3232

3333
```python
34-
35-
import causalpy as cp
36-
import matplotlib.pyplot as plt
37-
38-
39-
# Import and process data
40-
df = (
41-
cp.load_data("drinking")
42-
.rename(columns={"agecell": "age"})
43-
.assign(treated=lambda df_: df_.age > 21)
44-
)
45-
46-
# Run the analysis
47-
result = cp.RegressionDiscontinuity(
48-
df,
49-
formula="all ~ 1 + age + treated",
50-
running_variable_name="age",
51-
model=cp.pymc_models.LinearRegression(),
52-
treatment_threshold=21,
53-
)
54-
55-
# Visualize outputs
56-
fig, ax = result.plot();
57-
58-
# Get a results summary
59-
result.summary()
60-
61-
plt.show()
34+
import causalpy as cp
35+
import matplotlib.pyplot as plt
36+
37+
38+
# Import and process data
39+
df = (
40+
cp.load_data("drinking")
41+
.rename(columns={"agecell": "age"})
42+
.assign(treated=lambda df_: df_.age > 21)
43+
)
44+
45+
# Run the analysis
46+
result = cp.RegressionDiscontinuity(
47+
df,
48+
formula="all ~ 1 + age + treated",
49+
running_variable_name="age",
50+
model=cp.pymc_models.LinearRegression(),
51+
treatment_threshold=21,
52+
)
53+
54+
# Visualize outputs
55+
fig, ax = result.plot()
56+
# Get a results summary
57+
result.summary()
58+
59+
plt.show()
6260
```
6361

6462
## Videos

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ description = "Causal inference for quasi-experiments in Python"
1818
readme = "README.md"
1919
license = { file = "LICENSE" }
2020
authors = [{ name = "Ben Vincent", email = "[email protected]" }]
21-
requires-python = ">=3.10"
21+
requires-python = ">=3.11"
2222

2323
# This field lists other packages that your project depends on to run.
2424
# Any package you put here will be installed by pip when your project is

0 commit comments

Comments
 (0)