<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
see the [Documentation](https://bernardodionisi.github.io/differences/latest/) for more details.
## Installing
The latest release can be installed using pip
```bash
pip install differences
```
requires Python >= 3.9
## 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 treatment 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 benefited from
- Callaway & Sant'Anna's [did](https://github.com/bcallaway11/did)
- Sant'Anna and Zhao's [DRDID](https://github.com/pedrohcgs/DRDID)
Raw data
{
"_id": null,
"home_page": "",
"name": "differences",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "did,difference-in-differences,panel data,econometrics,causal inference",
"author": "",
"author_email": "Bernardo Dionisi <bernardo.dionisi@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e2/ea/6edbc3ee817168ca2d7155811086c9e107eae03ec83d8f222bd52c93f278/differences-0.2.0.tar.gz",
"platform": null,
"description": "<img src=\"./doc/source/images/logo/bw/logo_name_bw.png\" alt=\"drawing\" width=\"200\"\nstyle=\"display: block;margin-left: auto;margin-right: auto;width: 80%;\"/>\n\ndifference-in-differences estimation and inference for Python\n\n**For the following use cases**\n\n- Balanced panels, unbalanced panels & repeated cross-section\n- Two + Multiple time periods\n- Fixed + Staggered treatment timing\n- Binary + Multi-Valued treatment\n- Heterogeneous treatment effects & triple difference\n\nsee the [Documentation](https://bernardodionisi.github.io/differences/latest/) for more details.\n\n## Installing\n\nThe latest release can be installed using pip\n\n```bash\npip install differences\n```\n\nrequires Python >= 3.9\n\n## Quick Start\n\n### ATTgt\n\nthe ATTgt class implements the estimation procedures suggested by [Callaway and Sant'Anna (2021)\n](https://www.sciencedirect.com/science/article/abs/pii/S0304407620303948), [Sant'Anna and Zhao\n(2020)](https://www.sciencedirect.com/science/article/abs/pii/S0304407620301901) and the\nmulti-valued treatment case discussed\nin [Callaway, Goodman-Bacon & Sant'Anna (2021)](https://arxiv.org/abs/2107.02637)\n\n```python\nfrom differences import ATTgt, simulate_data\n\ndf = simulate_data()\n\natt_gt = ATTgt(data=df, cohort_name='cohort')\n\natt_gt.fit(formula='y')\n\natt_gt.aggregate('event')\n```\n\n*differences* ATTgt benefited from\n- Callaway & Sant'Anna's [did](https://github.com/bcallaway11/did)\n- Sant'Anna and Zhao's [DRDID](https://github.com/pedrohcgs/DRDID)\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "difference-in-differences estimation and inference in Python",
"version": "0.2.0",
"project_urls": {
"Documentation": "https://bernardodionisi.github.io/differences/latest/",
"Homepage": "https://github.com/bernardodionisi/differences",
"Issues": "https://github.com/bernardodionisi/differences/issues",
"Source": "https://github.com/bernardodionisi/differences"
},
"split_keywords": [
"did",
"difference-in-differences",
"panel data",
"econometrics",
"causal inference"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "93c7f3e58610709703b416d2dbfe97e41e416a2141fb03a5453ee45a0723c44c",
"md5": "ce931e80c06775446588a5bbcc5e1aca",
"sha256": "c83dca3359d5f599a8eac81199e987086d9466b8689bd3593f584b71c98f9e69"
},
"downloads": -1,
"filename": "differences-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ce931e80c06775446588a5bbcc5e1aca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 383926,
"upload_time": "2023-12-10T01:21:39",
"upload_time_iso_8601": "2023-12-10T01:21:39.802442Z",
"url": "https://files.pythonhosted.org/packages/93/c7/f3e58610709703b416d2dbfe97e41e416a2141fb03a5453ee45a0723c44c/differences-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e2ea6edbc3ee817168ca2d7155811086c9e107eae03ec83d8f222bd52c93f278",
"md5": "43ea46b43e28fd5f9cd2faa0eb886f84",
"sha256": "54390bfd3bb49a80154a47fe6932573e3ceb6924fc45f68fe5187c5cfede6cb6"
},
"downloads": -1,
"filename": "differences-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "43ea46b43e28fd5f9cd2faa0eb886f84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 472346,
"upload_time": "2023-12-10T01:21:41",
"upload_time_iso_8601": "2023-12-10T01:21:41.746394Z",
"url": "https://files.pythonhosted.org/packages/e2/ea/6edbc3ee817168ca2d7155811086c9e107eae03ec83d8f222bd52c93f278/differences-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-10 01:21:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bernardodionisi",
"github_project": "differences",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "differences"
}