Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For past changes and release history, see [CHANGELOG.md](CHANGELOG.md).

## Current Status

diff-diff v2.1.1 is a **production-ready** DiD library with feature parity with R's `did` + `HonestDiD` + `synthdid` ecosystem for core DiD analysis:
diff-diff v2.3.0 is a **production-ready** DiD library with feature parity with R's `did` + `HonestDiD` + `synthdid` ecosystem for core DiD analysis:

- **Core estimators**: Basic DiD, TWFE, MultiPeriod, Callaway-Sant'Anna, Sun-Abraham, Borusyak-Jaravel-Spiess Imputation, Synthetic DiD, Triple Difference (DDD), TROP
- **Valid inference**: Robust SEs, cluster SEs, wild bootstrap, multiplier bootstrap, placebo-based variance
Expand All @@ -20,14 +20,10 @@ diff-diff v2.1.1 is a **production-ready** DiD library with feature parity with

---

## Near-Term Enhancements (v2.2)
## Near-Term Enhancements (v2.4)

High-value additions building on our existing foundation.

### ~~Borusyak-Jaravel-Spiess Imputation Estimator~~ ✅ Implemented (v2.2)

Implemented as `ImputationDiD` — see `diff_diff/imputation.py`. Includes conservative variance (Theorem 3), event study and group aggregation, pre-trend test (Equation 9), multiplier bootstrap, and Proposition 5 handling for no never-treated units.

### Gardner's Two-Stage DiD (did2s)

Two-stage approach gaining traction in applied work. First residualizes outcomes, then estimates effects.
Expand Down Expand Up @@ -81,7 +77,7 @@ Extend the existing `TripleDifference` estimator to handle staggered adoption se

---

## Medium-Term Enhancements (v2.3+)
## Medium-Term Enhancements (v2.5+)

Extending diff-diff to handle more complex settings.

Expand Down Expand Up @@ -206,11 +202,6 @@ For high-dimensional settings with many potential confounders.

Ongoing maintenance and developer experience.

### Code Quality

- Consider splitting `staggered.py` (1800+ lines)
- Consider splitting `prep.py` (now 2000+ lines with DGP functions)

### Documentation

- Video tutorials and worked examples
Expand Down
29 changes: 0 additions & 29 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,6 @@ Current limitations that may affect users:
| MultiPeriodDiD wild bootstrap not supported | `estimators.py:1068-1074` | Low | Edge case |
| `predict()` raises NotImplementedError | `estimators.py:532-554` | Low | Rarely needed |

### ~~NaN Standard Errors for Rank-Deficient Matrices~~ (RESOLVED)

**Status**: Resolved in v2.2.0 with R-style rank deficiency handling.

**Solution**: The OLS solver now detects rank-deficient design matrices using pivoted QR decomposition and handles them following R's `lm()` approach:
- Warns users about dropped columns
- Sets NaN for coefficients of linearly dependent columns
- Computes valid SEs for identified (non-dropped) coefficients only
- Expands vcov matrix with NaN for dropped rows/columns

This is controlled by the `rank_deficient_action` parameter in `solve_ols()`:
- `"warn"` (default): Emit warning, set NA for dropped coefficients
- `"error"`: Raise ValueError
- `"silent"`: No warning, but still set NA for dropped coefficients

---

## Code Quality

### Large Module Files
Expand Down Expand Up @@ -106,16 +89,6 @@ Pyright reports 282 type errors. Most are false positives from numpy/pandas type

**Note:** Most errors are false positives from imprecise type stubs. Mypy config in pyproject.toml already handles these via `disable_error_code`.

### ~~Rust Code Quality~~ (RESOLVED)

**Status**: Resolved in v2.1.5. All Clippy warnings addressed:

- [x] `rust/src/linalg.rs` - Added `#[allow(clippy::type_complexity)]` for complex return type, prefixed unused `n` with `_`
- [x] `rust/src/trop.rs` - Added `#[allow(clippy::too_many_arguments)]` to internal functions
- [x] `rust/src/weights.rs` - Replaced needless range loop with iterator

---

## Deprecated Code

Deprecated parameters still present for backward compatibility:
Expand Down Expand Up @@ -149,8 +122,6 @@ Enhancements for `honest_did.py`:
## CallawaySantAnna Bootstrap Improvements

- [ ] Consider aligning p-value computation with R `did` package (symmetric percentile method)
- [x] ~~Investigate RuntimeWarnings in influence function aggregation~~
- ✅ Added `np.errstate` context manager in `staggered_aggregation.py` to suppress warnings during weight influence function computation

---

Expand Down