Skip to content

Commit 5e527ab

Browse files
igerberclaude
andcommitted
Address PR review feedback
- Add new DGP functions to CLAUDE.md Module Structure section - Restore trailing newlines to modified notebook files - Add RuntimeWarnings investigation items to TODO.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 816a92c commit 5e527ab

7 files changed

Lines changed: 26 additions & 6 deletions

File tree

CLAUDE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,12 @@ pytest tests/test_rust_backend.py -v
195195
- Integrates with HonestDiD for comprehensive sensitivity analysis
196196

197197
- **`diff_diff/prep.py`** - Data preparation utilities:
198-
- `generate_did_data` - Create synthetic data with known treatment effect
198+
- `generate_did_data` - Create synthetic data with known treatment effect (basic 2x2 DiD)
199+
- `generate_staggered_data` - Staggered adoption data for CallawaySantAnna/SunAbraham
200+
- `generate_factor_data` - Factor model data for TROP/SyntheticDiD
201+
- `generate_ddd_data` - Triple Difference (DDD) design data
202+
- `generate_panel_data` - Panel data with optional parallel trends violations
203+
- `generate_event_study_data` - Event study data with simultaneous treatment
199204
- `make_treatment_indicator`, `make_post_indicator` - Create binary indicators
200205
- `wide_to_long`, `balance_panel` - Panel data reshaping
201206
- `validate_did_data`, `summarize_did_data` - Data validation and summary

TODO.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ Enhancements for `honest_did.py`:
9292

9393
---
9494

95+
## RuntimeWarnings in Linear Algebra Operations
96+
97+
Pre-existing RuntimeWarnings in matrix operations that should be investigated:
98+
99+
- [ ] `linalg.py:162` - "divide by zero", "overflow", "invalid value" in fitted value computation
100+
- Occurs during `X @ coefficients` when coefficients contain extreme values
101+
- Seen in test_prep.py during treatment effect recovery tests
102+
- [ ] `triple_diff.py:307,323` - Similar warnings in propensity score computation
103+
- Occurs in IPW and DR estimation methods with covariates
104+
- Related to logistic regression overflow in edge cases
105+
106+
**Note**: These warnings do not affect correctness of results but should be handled gracefully (e.g., with `np.errstate` context managers or input validation).
107+
108+
---
109+
95110
## Rust Backend Optimizations
96111

97112
Deferred from PR #58 code review (completed in v2.0.3):

docs/tutorials/02_staggered_did.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,4 +912,4 @@
912912
},
913913
"nbformat": 4,
914914
"nbformat_minor": 4
915-
}
915+
}

docs/tutorials/04_parallel_trends.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,4 +798,4 @@
798798
},
799799
"nbformat": 4,
800800
"nbformat_minor": 4
801-
}
801+
}

docs/tutorials/07_pretrends_power.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,4 +768,4 @@
768768
},
769769
"nbformat": 4,
770770
"nbformat_minor": 5
771-
}
771+
}

docs/tutorials/08_triple_diff.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,4 +470,4 @@
470470
},
471471
"nbformat": 4,
472472
"nbformat_minor": 4
473-
}
473+
}

docs/tutorials/10_trop.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,4 +616,4 @@
616616
},
617617
"nbformat": 4,
618618
"nbformat_minor": 4
619-
}
619+
}

0 commit comments

Comments
 (0)