Skip to content

Docs: Add Staggered DiD sensitivity checks walkthrough#846

Open
drbenvincent wants to merge 2 commits into
mainfrom
staggered-did-sensitivity-checks-walkthrough
Open

Docs: Add Staggered DiD sensitivity checks walkthrough#846
drbenvincent wants to merge 2 commits into
mainfrom
staggered-did-sensitivity-checks-walkthrough

Conversation

@drbenvincent

Copy link
Copy Markdown
Collaborator

Summary

Adds a focused sensitivity-check walkthrough for Staggered DiD to the staggered_did_pymc.ipynb notebook, addressing #791.

This continues the work from #806 (by @arthurmello) and incorporates the review feedback:

  • Sensitivity analysis section with PreTreatmentPlaceboCheck walkthrough using the pipeline API (EstimateEffectSensitivityAnalysisGenerateReport)
  • Related checks subsection clarifying that only PreTreatmentPlaceboCheck and PriorSensitivity apply to staggered DiD, and that other checks like PlaceboInTime and LeaveOneOut are for different estimators
  • "How it works" explanation of the tolerance-based pass/fail logic
  • Walkthrough with numbered steps and interpretation guidance
  • "If this check fails" subsection with 4 concrete troubleshooting actions: inspect event-study plot for directional pre-trends, check pre-treatment window sparsity, revisit outcome model specification, compare results under alternative priors with PriorSensitivity
  • Pipeline code cell and HTML report iframe

Supersedes #806. Closes #791.

Test plan

  • prek run --all-files passes (verified locally)
  • Notebook schema validation passes
  • ReadTheDocs preview renders the new sections correctly
  • CI notebooks job executes the staggered DiD notebook without errors

Made with Cursor

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions Bot added OSS_PRODUCT OSS_PRODUCT project priorities. Labs members should get approval before logging hours. documentation Improvements or additions to documentation labels Apr 15, 2026
@read-the-docs-community

read-the-docs-community Bot commented Apr 15, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.60%. Comparing base (deb8774) to head (72d51c1).
⚠️ Report is 73 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #846   +/-   ##
=======================================
  Coverage   94.60%   94.60%           
=======================================
  Files          80       80           
  Lines       12764    12764           
  Branches      770      770           
=======================================
  Hits        12076    12076           
  Misses        485      485           
  Partials      203      203           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

arthurmello and others added 2 commits April 28, 2026 13:26
- Replace misleading PlaceboInTime reference with clear statement that
  only PreTreatmentPlaceboCheck and PriorSensitivity apply to staggered DiD
- Add "If this check fails" subsection with concrete troubleshooting steps:
  inspect event-study plot for directional pre-trends, check pre-treatment
  window sparsity, revisit outcome model specification, and compare
  results under alternative priors

Made-with: Cursor
@drbenvincent drbenvincent force-pushed the staggered-did-sensitivity-checks-walkthrough branch from 0f917f5 to 72d51c1 Compare April 28, 2026 12:27
drbenvincent added a commit that referenced this pull request Apr 30, 2026
Adds a sensitivity-analysis section to sc_pymc.ipynb that walks through
the pipeline API (EstimateEffect -> SensitivityAnalysis -> GenerateReport)
with PlaceboInTime as the SC default check, and documents the other
SC-applicable checks (ConvexHullCheck, LeaveOneOut, PlaceboInSpace,
PriorSensitivity) with interpretation guidance. Mirrors the structure
introduced for Staggered DiD in #846 and links back to the central guide
from #818.

Includes a runnable pipeline cell and HTML report iframe so the walkthrough
demonstrates an end-to-end placebo-in-time check with concrete pass/fail
narrative and a five-step "if this check fails" troubleshooting block.

Closes #789

Made-with: Cursor
@drbenvincent

Copy link
Copy Markdown
Collaborator Author

Automated triage

Recommendation: review:medium — no decision gate identified.

Why:

  • Documentation-only: adds sensitivity walkthrough to staggered_did_pymc.ipynb (28 lines added, 3 deleted).
  • No code changes. All CI checks pass. PR is conflicted (DIRTY).
  • Already has documentation and OSS_PRODUCT labels.

Review focus:

  1. Verify the PreTreatmentPlaceboCheck pipeline cell executes correctly.
  2. Confirm the walkthrough structure matches the established pattern from the central sensitivity guide.
  3. Check the troubleshooting section provides actionable guidance for practitioners.

Confidence: high

@drbenvincent drbenvincent added the review:medium Contained change requiring focused human review label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation OSS_PRODUCT OSS_PRODUCT project priorities. Labs members should get approval before logging hours. review:medium Contained change requiring focused human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Add Staggered DiD sensitivity checks walkthrough (follow-up #749)

2 participants