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() and aggte() functions

  • Doubly 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 effects

  • Add aggte() function for aggregating group-time effects into event studies, overall ATT, group effects, and calendar time effects

  • Add 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 dataset

  • Add 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_panel estimator

  • 06b77e9: 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_rc estimator

  • 31ac269: 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_gt function

  • 74d84bc: Add wrapper for aggregate ATT

  • c77b572: Add compute_aggte function with group assignments and sampling weights

  • 42ca5ae: Add compute_att_gt functions for multi-period DiD analysis

  • 05d012b: Add multi-period and aggregate treatment effect result objects

  • 40455b7: Add influence function support for overall ATT in AGGTE results

  • b2643d3: Add MPPretestResult for 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 mboot function

  • 1def724: Add standard multiplier bootstrap functionality

  • 0c817c0: Add mboot_twfep_did function for TWFE bootstrap

  • a1f0be2: 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_rc for DR-DiD bootstrap with repeated cross-section

  • fedcea8: Add wboot_twfe_rc estimator

  • 57c5b50: Add wboot_std_ipw_rc estimator

  • 14c096c: Add wboot_reg_rc estimator

Data and Preprocessing#

  • 8d340e0: Add load_mpdta function for multiple time period DiD analysis

  • 6b7d2b1: Add preprocessing functions

  • a3101fa: Add DR-DiD preprocessing module

  • d4b1862: Add panel and RC utility functions

  • 10a0ede: Add print function for DiD results

Propensity Score#

  • ab7a1ff: Add propensity score methods

  • 48e3b06: Add trimming functionality to AIPW estimators

  • ab084c1: Enhance IPT propensity score with quantile constraints and collinearity removal

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#

  • 585bdbd: Add tests for AIPW estimators and preprocess functions

  • a564175: Add tests for DR-DiD DGP

  • 127ce5d: Add ARP nuisance parameter tests

  • 9aa1d07: Add tests for preprocessing

  • c854616: Add tests for wboot_ipw_panel

Contributors#

A total of 1 person contributed to this release.

  • Jordan Deklerk