differences-0.1.2
توضیحات
difference-in-differences estimation and inference in Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | differences-0.1.2 |
| نام | differences |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Bernardo Dionisi |
| ایمیل نویسنده | bernardo.dionisi@gmail.com |
| آدرس صفحه اصلی | https://github.com/bernardodionisi/differences |
| آدرس اینترنتی | https://pypi.org/project/differences/ |
| مجوز | GPLv3 |
<img src="./doc/source/images/logo/bw/logo_name_bw.png" alt="drawing" width="200"
style="display: block;margin-left: auto;margin-right: auto;width: 80%;"/>
difference-in-differences estimation and inference for Python
**For the following use cases**
- Balanced panels, unbalanced panels & repeated cross-section
- Two + Multiple time periods
- Fixed + Staggered treatment timing
- Binary + Multi-Valued treatment
- Heterogeneous treatment effects & triple difference
- One + Multiple treatments per entity
see the [Documentation](https://differences.readthedocs.io/en/latest/) for more details.
## Installing
The latest release can be installed using pip
```bash
pip install differences
```
requires Python 3.8+
## Quick Start
### ATTgt
the ATTgt class implements the estimation procedures suggested by [Callaway and Sant'Anna (2021)
](https://www.sciencedirect.com/science/article/abs/pii/S0304407620303948), [Sant'Anna and Zhao
(2020)](https://www.sciencedirect.com/science/article/abs/pii/S0304407620301901) and the
multi-valued treatement case discussed in [Callaway, Goodman-Bacon & Sant'Anna (2021)](https://arxiv.org/abs/2107.02637)
```python
from differences import ATTgt, simulate_data
df = simulate_data()
att_gt = ATTgt(data=df, cohort_name='cohort')
att_gt.fit(formula='y')
att_gt.aggregate('event')
```
*differences* ATTgt benefitted substantially from the original authors' R packages: Callaway & Sant'Anna's [did](https://github.com/bcallaway11/did) and Sant'Anna and
Zhao's [DRDID](https://github.com/pedrohcgs/DRDID)
### TWFE
```python
from differences import TWFE, simulate_data
df = simulate_data()
att_gt = TWFE(data=df, cohort_name='cohort')
att_gt.fit(formula='y')
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.2 | pandas |
| >=1.16 | numpy |
| >=1.8 | scipy |
| >=0.3.4,<0.4.0 | formulaic |
| >=4.25 | linearmodels |
| >=0.13,<1.0 | statsmodels |
| >=0.1.2,<0.2.0 | pyhdfe |
| >=1.0.2 | scikit-learn |
| >=0.1.3,<0.2.0 | plotto |
| >=4.64.1,<5.0.0 | tqdm |
| >=1.2.0,<2.0.0 | joblib |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0.0 | Python |
نحوه نصب
نصب پکیج whl differences-0.1.2:
pip install differences-0.1.2.whl
نصب پکیج tar.gz differences-0.1.2:
pip install differences-0.1.2.tar.gz