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
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.60%. Comparing base (deb8774) to head (72d51c1).

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 Sentry.
📢 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
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.

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