Skip to content

Fix result summary table to appropriately show the significance level in the table#18

Merged
igerber merged 1 commit intomainfrom
claude/test-did-estimator-KudzU
Jan 3, 2026
Merged

Fix result summary table to appropriately show the significance level in the table#18
igerber merged 1 commit intomainfrom
claude/test-did-estimator-KudzU

Conversation

@igerber
Copy link
Copy Markdown
Owner

@igerber igerber commented Jan 3, 2026

The summary() method showed a significance codes legend at the bottom but never displayed the actual stars next to the p-value. Added the significance_stars property to the ATT row in DiDResults, MultiPeriodDiDResults (avg effect), and SyntheticDiDResults.

The summary() method showed a significance codes legend at the bottom
but never displayed the actual stars next to the p-value. Added the
significance_stars property to the ATT row in DiDResults,
MultiPeriodDiDResults (avg effect), and SyntheticDiDResults.
@igerber igerber merged commit 3d1d9b1 into main Jan 3, 2026
@igerber igerber deleted the claude/test-did-estimator-KudzU branch January 3, 2026 19:53
igerber added a commit that referenced this pull request Apr 19, 2026
…aths

Addresses findings #17, #18, #19 from the Phase 2 silent-failures audit (axis A,
all Minor). Each site previously ran np.linalg.solve against a matrix that
could be rank-deficient or near-singular with no user-facing signal.

- StaggeredTripleDifference: `_compute_did_panel` now appends a condition-number
  sample to an instance tracker on LinAlgError; `fit()` emits ONE aggregate
  UserWarning listing affected (g, g_c, t) cells and the max condition number
  instead of silently falling back to np.linalg.lstsq per pair. Tracker resets
  on repeat fit.
- EfficientDiD covariate sieve (estimate_propensity_ratio_sieve,
  estimate_inverse_propensity_sieve): precondition-check the normal-equations
  matrix via np.linalg.cond before solve and reject K values above
  1/sqrt(eps); partial-K skips now surface via UserWarning listing the
  skipped K values, instead of being swallowed by `continue`.
- compute_survey_vcov: check cond(X'WX) before the sandwich solve; emit
  UserWarning above the 1/sqrt(eps) threshold so ill-conditioned bread
  matrices don't silently produce unstable variance estimates.

Sibling sites picked up via repo-wide lstsq-fallback pattern grep (per
the pattern-check feedback memory):
- two_stage.py:1768 (TSL variance bread)
- two_stage_bootstrap.py:197 (multiplier bootstrap bread)
Both now warn before the silent lstsq fallback.

Adds 8 targeted tests across test_staggered_triple_diff.py,
test_efficient_did.py, and test_survey.py, covering collinear/ill-conditioned
triggers and happy-path negatives. REGISTRY.md notes added for each affected
estimator section. No behavioral change on well-conditioned inputs.

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