ModernDiD 0.0.1 Release Notes#
ModernDiD 0.0.1 is the initial release of the package, providing a unified Python implementation of modern difference-in-differences methodologies.
Highlights#
This release includes the core functionality for difference-in-differences estimation:
Multi-period staggered DiD: Implementation of the Callaway and Sant’Anna (2021) estimator for staggered treatment adoption designs via
att_gt()andaggte()functionsDoubly robust DiD estimators: Full suite of DR-DiD estimators for both panel data and repeated cross-sections following Sant’Anna and Zhao (2020)
Sensitivity analysis: HonestDiD module implementing Rambachan and Roth (2023) sensitivity analysis for parallel trends violations
Bootstrap inference: Multiplier bootstrap for standard errors and simultaneous confidence bands
New Features#
Core Estimators#
Add
att_gt()function for group-time average treatment effectsAdd
aggte()function for aggregating group-time effects into event studies, overall ATT, group effects, and calendar time effectsAdd doubly robust DiD estimators (
drdid_panel,drdid_rc)Add IPW and outcome regression DiD estimators
Add two-way fixed effects estimators
Sensitivity Analysis#
Add HonestDiD sensitivity analysis functions following Rambachan and Roth (2023)
Support for smoothness restrictions and relative magnitudes bounds
Add ARP confidence interval functions
Infrastructure#
Add
load_mpdta()function for loading example minimum wage datasetAdd comprehensive documentation with Sphinx
Add test suite with pytest
Set up CI/CD with GitHub Actions
Major Commits#
Note
This project began as a solo side project, and at the time I did not anticipate it growing into a full software package. As a result, the initial development did not follow best practices such as using pull requests for changes. Starting with version 0.0.2, all changes are tracked via pull requests.
A total of 450 commits were made for this release, including 102 feature commits, 24 bug fixes, and 98 refactors. Below are 70 key commits grouped by area (excluding documentation, chore, and automated updates).
Core Estimators#
415d74c: Add DR-DiD wrapper for doubly robust DiD estimators
1fc3981: Add
drdid_panelestimator06b77e9: Add DR-DiD estimators for improved and locally efficient repeated cross-section
371e886: Add DR-DiD estimator for panel data and fix IPT propensity computation
0f29f03: Add inverse-propensity weighted DiD estimator
91e092c: Add IPW DiD estimator for panel data
5d8b8d2: Add standardized IPW DiD estimator for repeated cross-section
f7ed590: Add standardized IPW estimator for panel data
27e2f03: Add outcome regression DiD estimator
29f5144: Add outcome regression panel DiD estimator
2a23230: Add
drdid_trad_rcestimator31ac269: Add DR-DiD locally efficient estimator
b21d6b0: Add IPW wrapper
0a107b7: Add TWFE DiD estimators
afc3187: Add WOLS estimators
Multi-period Staggered DiD#
9bcb04a: Add
att_gtfunction74d84bc: Add wrapper for aggregate ATT
c77b572: Add
compute_aggtefunction with group assignments and sampling weights42ca5ae: Add
compute_att_gtfunctions for multi-period DiD analysis05d012b: Add multi-period and aggregate treatment effect result objects
40455b7: Add influence function support for overall ATT in AGGTE results
b2643d3: Add
MPPretestResultfor pre-test of parallel trends assumption
HonestDiD Sensitivity Analysis#
852de48: Add new directory for Honest DiD
53fe33b: Add utility functions for Honest DiD analysis
4aad9b1: Add APR confidence interval functions
aff332f: Add ARP confidence interval functions with nuisance params
bc4f165: Add functions for fixed-length confidence intervals (FLCI)
4ff564a: Add functions for bound estimation and conditional tests
1e628c4: Add functions for relative magnitudes restrictions
700dfff: Add monotonicity and sign constraint matrix functions
a8a479a: Add functions for second difference inference
f043407: Add Honest DiD main sensitivity analysis functions
846b5f9: Add sensitivity analysis and plotting functions
Bootstrap Inference#
3918479: Add
mbootfunction1def724: Add standard multiplier bootstrap functionality
0c817c0: Add
mboot_twfep_didfunction for TWFE bootstrapa1f0be2: Add bootstrap inference for doubly-robust DiD estimators
de30695: Add IPT bootstrap functions
4276f80: Add traditional bootstrap for DR-DiD with panel data
d3ca89e: Add improved bootstrap for DR-DiD with panel data
f57828d: Add
wboot_drdid_rcfor DR-DiD bootstrap with repeated cross-sectionfedcea8: Add
wboot_twfe_rcestimator57c5b50: Add
wboot_std_ipw_rcestimator14c096c: Add
wboot_reg_rcestimator
Data and Preprocessing#
Propensity Score#
Bug Fixes#
fb18373: Fix grid bounds issues and computations
74cd52c: Fix trapezoidal integration for CI length and linear program solver
c51ff0b: Fix pre-period constraint matrix calculations
e7b32b4: Update IPW estimator to use original weights directly
e0fe502: Improve error handling and warnings in weighted OLS functions
Performance and Refactoring#
ed7acbf: Integrate Numba for performance optimization
202dc12: Move second difference and monotonicity matrix implementations to Numba
d9b815f: Replace custom functions with optimized Numba versions
e7ef260: Improve grid default bound calculations in RM and SDRM functions
d347dd3: Enhance grid bounds calculation using identified sets
3966275: Enhance modularity and clarity in DiD estimators
Infrastructure#
Testing#
Contributors#
A total of 1 person contributed to this release.
Jordan Deklerk