difference-in-differences estimation and inference in Python
Project description
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
- Parallelized estimation & multiplier bootstrap (joblib, via
n_jobs)
see the Documentation for more details.
Installing
The latest release can be installed using pip
pip install differences
requires Python >= 3.10
Quick Start
ATTgt
the ATTgt class implements the estimation procedures suggested by Callaway and Sant'Anna (2021) , Sant'Anna and Zhao (2020) and the multi-valued treatment case discussed in Callaway, Goodman-Bacon & Sant'Anna (2021)
import differences
df = differences.generate_data() # requires the [all] extra: pip install differences[all]
att_gt = differences.ATTgt(data=df, cohort_column='cohort')
att_gt.fit(formula='y', n_jobs=-1)
att_gt.aggregate('event')
differences ATTgt was inspired by
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file differences-0.3.0.tar.gz.
File metadata
- Download URL: differences-0.3.0.tar.gz
- Upload date:
- Size: 324.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f0bf18908aac127a2ba93ca552f34a7a1d7e9433ea5dde0a0552e919579e980
|
|
| MD5 |
7e6d0a8cdcf215c0ef7b7affba071405
|
|
| BLAKE2b-256 |
985f28ef330dbf0379e1416c685f327e96805a7f0f0069f67691d88ba5187e7e
|
Provenance
The following attestation bundles were made for differences-0.3.0.tar.gz:
Publisher:
release.yaml on bernardodionisi/differences
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
differences-0.3.0.tar.gz -
Subject digest:
0f0bf18908aac127a2ba93ca552f34a7a1d7e9433ea5dde0a0552e919579e980 - Sigstore transparency entry: 1281049999
- Sigstore integration time:
-
Permalink:
bernardodionisi/differences@e59cd643ff76326973d8ec388d70e9ce154972ab -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/bernardodionisi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e59cd643ff76326973d8ec388d70e9ce154972ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file differences-0.3.0-py3-none-any.whl.
File metadata
- Download URL: differences-0.3.0-py3-none-any.whl
- Upload date:
- Size: 89.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06164a4ed52c55ba958ad8c9ef2081841f985ba12b9850985b08fded1ff10c82
|
|
| MD5 |
18c204fb732c91389c3547ce13867693
|
|
| BLAKE2b-256 |
c0711e443377b27847eccf2dc1889893054f38d4b949d7ebe62a1d0270e4e674
|
Provenance
The following attestation bundles were made for differences-0.3.0-py3-none-any.whl:
Publisher:
release.yaml on bernardodionisi/differences
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
differences-0.3.0-py3-none-any.whl -
Subject digest:
06164a4ed52c55ba958ad8c9ef2081841f985ba12b9850985b08fded1ff10c82 - Sigstore transparency entry: 1281050001
- Sigstore integration time:
-
Permalink:
bernardodionisi/differences@e59cd643ff76326973d8ec388d70e9ce154972ab -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/bernardodionisi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e59cd643ff76326973d8ec388d70e9ce154972ab -
Trigger Event:
push
-
Statement type: