docs: Tutorial 28 - The Scholarship Illusion (sharp and fuzzy RDD) - #766
Conversation
PR ReviewOverall assessment✅ Looks good — no unmitigated P0/P1 findings. Executive summary
MethodologyP2 — Fuzzy treatment is enrollment, not scholarship receipt
P2 — Bandwidth sweep implicitly changes both
|
…-sweep mechanics - The fuzzy treatment is FUNDED ENROLLMENT (scholarship above the cutoff, equivalent outside aid below), not scholarship receipt: DGP prose/comment and the Act 5 title/intro now name the estimand precisely, noting that complier enrollment is scholarship-funded. - Bandwidth sweep: document that passing h alone also sets b = h (R convention), so the sweep is the complete RBC procedure per window - a joint sweep of both bandwidths - with b=/rho= named for the hold-bias-bandwidth-fixed design. - Both corrected qualifiers locked in the drift quote test.
|
🔁 AI review rerun (requested by @igerber) Head SHA: PR ReviewOverall assessment✅ Looks good — no unmitigated P0/P1 findings. Executive summary
MethodologyP3 — Documented deviations
Code QualityP2 —
|
P_COMPLY named the offered-side enrollment probability (0.72), not the complier share (0.72 - 0.06 = 0.66). Renamed to P_ENROLL_IF_OFFERED in the notebook DGP cell and the drift test's faithful copy, with the complier-share arithmetic noted in the constant's comment. Data, estimates, and prose are unchanged.
|
🔁 AI review rerun (requested by @igerber) Head SHA: PR ReviewOverall assessment✅ Looks good — no unmitigated P0/P1 findings. Executive summary
MethodologyP3 — Documented implementation differences
Code QualityP3 — Previous naming finding resolved
PerformanceNo findings. MaintainabilityNo findings. Tech DebtNo untracked deferred work found. SecurityNo findings or exposed secrets detected. Documentation/TestsNo findings. Notebook JSON, code-cell syntax, committed outputs, rendered claims, configuration locks, and dependency-map links passed static validation. Runtime tests could not run because |
New tutorial notebook showcasing RegressionDiscontinuity and RDPlot: a naive above-vs-below cutoff comparison overstates a merit scholarship's effect ~5x ($14,779 vs a designed $2,640 offer ITT); RDPlot reveals the trend confound and the cutoff jump; sharp RD recovers the offer ITT with robust bias-corrected inference; the validity toolkit runs estimator-as-balance-test, illustrative placebo cutoffs, and a bandwidth sweep (framed as falsification / supporting evidence, with continuity itself untestable); fuzzy RD via takeup= spells out the full local-IV bundle (continuity, nonzero first stage, exclusion, monotonicity) and recovers the $4,000 complier LATE; CCFT 2019 covariate adjustment is scoped as the testable sufficient condition with a simulation-specific 27% CI shrink. tests/test_t28_rdd_scholarship_illusion_drift.py pins every headline number (sharp/fuzzy/balance/placebo/bandwidth/adjusted), executes the notebook's actual DGP cell and compares the full DataFrame against the test's copy, covers both RDPlot fits (bin counts, finite means/CIs, Agg render smoke), and locks the load-bearing prose qualifiers on the rendered surface. Registered in docs/tutorials/index.rst (Advanced Methods), CHANGELOG, and docs/doc-deps.yaml (tutorial rows for rdd.py and rdplot.py).
…-sweep mechanics - The fuzzy treatment is FUNDED ENROLLMENT (scholarship above the cutoff, equivalent outside aid below), not scholarship receipt: DGP prose/comment and the Act 5 title/intro now name the estimand precisely, noting that complier enrollment is scholarship-funded. - Bandwidth sweep: document that passing h alone also sets b = h (R convention), so the sweep is the complete RBC procedure per window - a joint sweep of both bandwidths - with b=/rho= named for the hold-bias-bandwidth-fixed design. - Both corrected qualifiers locked in the drift quote test.
P_COMPLY named the offered-side enrollment probability (0.72), not the complier share (0.72 - 0.06 = 0.66). Renamed to P_ENROLL_IF_OFFERED in the notebook DGP cell and the drift test's faithful copy, with the complier-share arithmetic noted in the constant's comment. Data, estimates, and prose are unchanged.
|
🔁 AI review rerun (requested by @igerber) Head SHA: PR ReviewOverall assessment✅ Looks good — no unmitigated P0/P1 findings. Executive summary
MethodologyP3 — Documented implementation differences
Code QualityP3 — Previous naming finding resolved
PerformanceNo findings. MaintainabilityNo findings. Tech DebtNo untracked deferred work. The absent manipulation-density diagnostic is explicitly documented in the Registry. SecurityNo findings or exposed secrets detected. Documentation/TestsNo findings. Notebook JSON, all 11 code-cell ASTs, execution order/output health, 33 drift strings/configurations, and tutorial registration passed static validation. Runtime pytest was unavailable because NumPy, pandas, SciPy, matplotlib, and pytest are not installed. |
Summary
docs/tutorials/28_rdd_scholarship_illusion.ipynb): the regression discontinuity walkthrough. A merit scholarship is awarded at an exam-score cutoff; the naive above-vs-below comparison claims $14,779 while the designed truth is a $2,640 offer ITT - the tutorial recovers it with sharp RD, then the $4,000 complier LATE with fuzzy RD.RDPlot(full-support + zoomedp=2, ci=95views), sharp RD with robust bias-corrected inference and the three-row summary explained, the validity toolkit (estimator-as-balance-test, illustrative within-side-median placebo cutoffs, bandwidth sweep - all framed as falsification/supporting evidence with continuity itself untestable), fuzzy RD viatakeup=with the full local-IV assumption bundle, and CCFT 2019 covariate adjustment (testable sufficient condition; simulation-specific 27% CI shrink).tests/test_t28_rdd_scholarship_illusion_drift.py(12 tests): pins every headline number, executes the notebook's actual DGP cell and compares the full DataFrame against the test's faithful copy, covers bothRDPlotfits (bin counts 123/163 and 72/76, finite means/CIs, Agg render smoke test), pins bandwidth-sweep CI endpoints with truth coverage, and locks the load-bearing prose qualifiers on the rendered surface.docs/tutorials/index.rst(Advanced Methods card + toctree),CHANGELOG.md(Unreleased/Added),docs/doc-deps.yaml(tutorial rows underdiff_diff/rdd.pyanddiff_diff/rdplot.py).Methodology references (required if estimator / math changes)
RegressionDiscontinuityandRDPlot)Validation
tests/test_t28_rdd_scholarship_illusion_drift.py(12 tests, all passing; deterministic single fits, no slow markers needed)sphinx -b html -Wdocs build passes;test_docs_ia.py+test_doc_deps_integrity.pygreenSecurity / privacy