|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [0.6.0] - 2025-01-04 |
| 9 | + |
| 10 | +### Added |
| 11 | +- **CallawaySantAnna covariate adjustment** for conditional parallel trends |
| 12 | + - Outcome regression (`estimation_method='reg'`) |
| 13 | + - Inverse probability weighting (`estimation_method='ipw'`) |
| 14 | + - Doubly robust estimation (`estimation_method='dr'`) |
| 15 | + - Pass covariates via `covariates` parameter in `fit()` |
| 16 | +- **Honest DiD sensitivity analysis** (Rambachan & Roth 2023) |
| 17 | + - `HonestDiD` class for computing bounds under parallel trends violations |
| 18 | + - Relative magnitudes restriction (`DeltaRM`) - bounds post-treatment violations by pre-treatment |
| 19 | + - Smoothness restriction (`DeltaSD`) - bounds second differences of trend violations |
| 20 | + - Combined restrictions (`DeltaSDRM`) |
| 21 | + - FLCI and C-LF confidence interval methods |
| 22 | + - Breakdown value computation via `breakdown_value()` |
| 23 | + - Sensitivity analysis over M grid via `sensitivity_analysis()` |
| 24 | + - `HonestDiDResults` and `SensitivityResults` dataclasses |
| 25 | + - `compute_honest_did()` convenience function |
| 26 | + - `plot_sensitivity()` for sensitivity analysis visualization |
| 27 | + - `plot_honest_event_study()` for event study with honest CIs |
| 28 | + - Tutorial notebook: `docs/tutorials/05_honest_did.ipynb` |
| 29 | +- **API documentation site** with Sphinx |
| 30 | + - Full API reference auto-generated from docstrings |
| 31 | + - "Which estimator should I use?" decision guide |
| 32 | + - Comparison with R packages (did, HonestDiD) |
| 33 | + - Getting started / quickstart guide |
| 34 | + |
| 35 | +### Changed |
| 36 | +- Updated mypy configuration for better numpy type compatibility |
| 37 | +- Modernized ruff configuration to use `[tool.ruff.lint]` section |
| 38 | + |
| 39 | +### Fixed |
| 40 | +- Fixed 21 ruff linting issues (import ordering, unused variables, ambiguous names) |
| 41 | +- Fixed 94 mypy type checking issues (Optional types, numpy type casts, assertions) |
| 42 | +- Added missing return statement in `run_placebo_test()` |
| 43 | + |
| 44 | +## [0.5.0] - 2024-12-01 |
| 45 | + |
| 46 | +### Added |
| 47 | +- **Wild cluster bootstrap** for valid inference with few clusters |
| 48 | + - Rademacher weights (default, good for most cases) |
| 49 | + - Webb's 6-point distribution (recommended for <10 clusters) |
| 50 | + - Mammen's two-point distribution |
| 51 | + - `WildBootstrapResults` dataclass |
| 52 | + - `wild_bootstrap_se()` utility function |
| 53 | + - Integration with `DifferenceInDifferences` and `TwoWayFixedEffects` via `inference='wild_bootstrap'` |
| 54 | +- **Placebo tests module** (`diff_diff.diagnostics`) |
| 55 | + - `placebo_timing_test()` - fake treatment timing test |
| 56 | + - `placebo_group_test()` - fake treatment group test |
| 57 | + - `permutation_test()` - permutation-based inference |
| 58 | + - `leave_one_out_test()` - sensitivity to individual treated units |
| 59 | + - `run_placebo_test()` - unified dispatcher for all test types |
| 60 | + - `run_all_placebo_tests()` - comprehensive diagnostic suite |
| 61 | + - `PlaceboTestResults` dataclass |
| 62 | +- **Tutorial notebooks** in `docs/tutorials/` |
| 63 | + - `01_basic_did.ipynb` - Basic 2x2 DiD, formula interface, covariates, fixed effects, wild bootstrap |
| 64 | + - `02_staggered_did.ipynb` - Staggered adoption with Callaway-Sant'Anna |
| 65 | + - `03_synthetic_did.ipynb` - Synthetic DiD with unit/time weights |
| 66 | + - `04_parallel_trends.ipynb` - Parallel trends testing and diagnostics |
| 67 | +- Comprehensive test coverage (380+ tests) |
| 68 | + |
| 69 | +## [0.4.0] - 2024-11-01 |
| 70 | + |
| 71 | +### Added |
| 72 | +- **Callaway-Sant'Anna estimator** for staggered difference-in-differences |
| 73 | + - `CallawaySantAnna` class with group-time ATT(g,t) estimation |
| 74 | + - Support for `never_treated` and `not_yet_treated` control groups |
| 75 | + - Aggregation methods: `simple`, `group`, `calendar`, `event_study` |
| 76 | + - `CallawaySantAnnaResults` with group-time effects and aggregations |
| 77 | + - `GroupTimeEffect` dataclass for individual effects |
| 78 | +- **Event study visualization** via `plot_event_study()` |
| 79 | + - Works with `MultiPeriodDiDResults`, `CallawaySantAnnaResults`, or DataFrames |
| 80 | + - Publication-ready formatting with customization options |
| 81 | +- **Group effects visualization** via `plot_group_effects()` |
| 82 | +- **Parallel trends testing utilities** |
| 83 | + - `check_parallel_trends()` - simple slope-based test |
| 84 | + - `check_parallel_trends_robust()` - Wasserstein distance test |
| 85 | + - `equivalence_test_trends()` - TOST equivalence test |
| 86 | + |
| 87 | +## [0.3.0] - 2024-10-01 |
| 88 | + |
| 89 | +### Added |
| 90 | +- **Synthetic Difference-in-Differences** (`SyntheticDiD`) |
| 91 | + - Unit weight optimization for synthetic control |
| 92 | + - Time weight computation for pre-treatment periods |
| 93 | + - Placebo-based and bootstrap inference |
| 94 | + - `SyntheticDiDResults` with weight accessors |
| 95 | +- **Multi-period DiD** (`MultiPeriodDiD`) |
| 96 | + - Event-study style estimation with period-specific effects |
| 97 | + - `MultiPeriodDiDResults` with `period_effects` dictionary |
| 98 | + - `PeriodEffect` dataclass for individual period results |
| 99 | +- **Data preparation utilities** (`diff_diff.prep`) |
| 100 | + - `generate_did_data()` - synthetic data generation |
| 101 | + - `make_treatment_indicator()` - create treatment from categorical/numeric |
| 102 | + - `make_post_indicator()` - create post-treatment indicator |
| 103 | + - `wide_to_long()` - reshape wide to long format |
| 104 | + - `balance_panel()` - ensure balanced panel data |
| 105 | + - `validate_did_data()` - data validation |
| 106 | + - `summarize_did_data()` - summary statistics by group |
| 107 | + - `create_event_time()` - event time for staggered designs |
| 108 | + - `aggregate_to_cohorts()` - aggregate to cohort means |
| 109 | + - `rank_control_units()` - rank controls by similarity |
| 110 | + |
| 111 | +## [0.2.0] - 2024-09-01 |
| 112 | + |
| 113 | +### Added |
| 114 | +- **Two-Way Fixed Effects** (`TwoWayFixedEffects`) |
| 115 | + - Within-transformation for unit and time fixed effects |
| 116 | + - Efficient handling of high-dimensional fixed effects via `absorb` |
| 117 | +- **Fixed effects support** in base `DifferenceInDifferences` |
| 118 | + - `fixed_effects` parameter for dummy variable approach |
| 119 | + - `absorb` parameter for within-transformation approach |
| 120 | +- **Cluster-robust standard errors** |
| 121 | + - `cluster` parameter for cluster-robust inference |
| 122 | +- **Formula interface** |
| 123 | + - R-style formulas like `"outcome ~ treated * post"` |
| 124 | + - Support for covariates in formulas |
| 125 | + |
| 126 | +## [0.1.0] - 2024-08-01 |
| 127 | + |
| 128 | +### Added |
| 129 | +- Initial release |
| 130 | +- **Basic Difference-in-Differences** (`DifferenceInDifferences`) |
| 131 | + - sklearn-like API with `fit()` method |
| 132 | + - Column name interface for outcome, treatment, time |
| 133 | + - Heteroskedasticity-robust (HC1) standard errors |
| 134 | + - `DiDResults` dataclass with ATT, SE, p-value, confidence intervals |
| 135 | + - `summary()` and `print_summary()` methods |
| 136 | + - `to_dict()` and `to_dataframe()` export methods |
| 137 | + - `is_significant` and `significance_stars` properties |
| 138 | + |
| 139 | +[0.6.0]: https://github.com/igerber/diff-diff/compare/v0.5.0...v0.6.0 |
| 140 | +[0.5.0]: https://github.com/igerber/diff-diff/compare/v0.4.0...v0.5.0 |
| 141 | +[0.4.0]: https://github.com/igerber/diff-diff/compare/v0.3.0...v0.4.0 |
| 142 | +[0.3.0]: https://github.com/igerber/diff-diff/compare/v0.2.0...v0.3.0 |
| 143 | +[0.2.0]: https://github.com/igerber/diff-diff/compare/v0.1.0...v0.2.0 |
| 144 | +[0.1.0]: https://github.com/igerber/diff-diff/releases/tag/v0.1.0 |
0 commit comments