Skip to content

Refactor estimators.py to reduce module size#39

Merged
igerber merged 3 commits intomainfrom
claude/refactor-estimators-n3DzQ
Jan 4, 2026
Merged

Refactor estimators.py to reduce module size#39
igerber merged 3 commits intomainfrom
claude/refactor-estimators-n3DzQ

Conversation

@igerber
Copy link
Copy Markdown
Owner

@igerber igerber commented Jan 4, 2026

Split large estimators.py (~1812 lines) into smaller focused modules:

  • estimators.py (~975 lines): DifferenceInDifferences, MultiPeriodDiD
  • twfe.py (~355 lines): TwoWayFixedEffects
  • synthetic_did.py (~540 lines): SyntheticDiD

Backward compatibility maintained via re-exports from estimators.py.
All 100 estimator tests pass. Updated CLAUDE.md and TODO.md.

claude added 3 commits January 4, 2026 22:19
Split large estimators.py (~1812 lines) into smaller focused modules:
- estimators.py (~975 lines): DifferenceInDifferences, MultiPeriodDiD
- twfe.py (~355 lines): TwoWayFixedEffects
- synthetic_did.py (~540 lines): SyntheticDiD

Backward compatibility maintained via re-exports from estimators.py.
All 100 estimator tests pass. Updated CLAUDE.md and TODO.md.
- README.md: Use `from diff_diff import TwoWayFixedEffects` (preferred)
- docs/api/estimators.rst: Document new module structure (twfe.py, synthetic_did.py)
  with backward-compatible import instructions
@igerber igerber merged commit b237909 into main Jan 4, 2026
1 check failed
@igerber igerber deleted the claude/refactor-estimators-n3DzQ branch January 4, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants