Skip to content

Update documentation to match current codebase#13

Merged
igerber merged 1 commit intomainfrom
claude/update-documentation-ycdIR
Jan 3, 2026
Merged

Update documentation to match current codebase#13
igerber merged 1 commit intomainfrom
claude/update-documentation-ycdIR

Conversation

@igerber
Copy link
Copy Markdown
Owner

@igerber igerber commented Jan 3, 2026

Add documentation for recently added data preparation utilities:

  • create_event_time: for staggered adoption event studies
  • aggregate_to_cohorts: for cohort-level aggregation
  • rank_control_units: for control unit selection in DiD/SDID

Updates both CLAUDE.md module summary and README.md with usage examples and API reference.

Add documentation for recently added data preparation utilities:
- create_event_time: for staggered adoption event studies
- aggregate_to_cohorts: for cohort-level aggregation
- rank_control_units: for control unit selection in DiD/SDID

Updates both CLAUDE.md module summary and README.md with usage
examples and API reference.
@igerber igerber merged commit 9e7223f into main Jan 3, 2026
@igerber igerber deleted the claude/update-documentation-ycdIR branch January 3, 2026 16:03
igerber pushed a commit that referenced this pull request Jan 4, 2026
Revised review reflects:
- #1, #4 verified as non-issues (correct by design)
- #3, #5, #6, #8, #13 addressed in commit e40d6b4
- Updated recommendation to approve and merge
- Remaining items are low-priority style suggestions for future PRs
igerber added a commit that referenced this pull request Apr 18, 2026
Replace the hard-coded "< 10 successes" warning threshold in the four
TROP bootstrap sites (local unit-resample, local Rao-Wu, global
unit-resample, global Rao-Wu) plus the Rust global happy path with a
proportional 5% failure-rate guard, matching the existing SyntheticDiD
bootstrap and placebo convention. A shared helper
`bootstrap_utils.warn_bootstrap_failure_rate` centralizes the check so
future axis-D work (e.g. PowerAnalysis simulation counter) can reuse it.

Before this change, a run with `n_bootstrap=200` and 11 successes
(94.5% failure rate) passed silently because 11 >= 10. Now any run
with failure rate > 5% emits a `UserWarning` surfacing the success
count, total attempts, and failure rate.

SDID bootstrap paths (`synthetic_did.py:1036-1070` and `:1229-1251`)
were verified during this work to already have the same 5% proportional
guard — D-2/D-3 in the audit are marked resolved rather than bundled.

Covered by audit axis D (degenerate-replicate handling). Findings
#13-#16 from `docs/audits/silent-failures-findings.md`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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