You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add donut RDD support to RegressionDiscontinuity
Introduces a donut_hole parameter to RegressionDiscontinuity, allowing exclusion of observations within a specified distance from the treatment threshold for robustness against manipulation or heaping. Updates plotting, summary, and input validation to support donut RDD, adds comprehensive tests for donut_hole behavior and validation, expands glossary with donut RDD concepts, and provides a new notebook demonstrating donut RDD usage. References on donut RDD, manipulation, and heaping are added to the bibliography.
* update cell tags
* Increase sample size and strengthen manipulation in donut RDD notebook
Raised the number of generated observations from 500 to 1000 and increased manipulation parameters to better demonstrate the donut RDD approach. Updated output and data table examples to reflect the new data generation settings.
* edit cell tag
* add glossary terms
* Expand explanation of heaping and manipulation in Donut RDD
* Add regression discontinuity edge case tests
Added tests for warnings when bandwidth or donut_hole filters leave few datapoints, for unrecognized model types, and for donut hole boundary lines in OLS and Bayesian plots. Also updated interrogate badge coverage from 96.3% to 96.4%.
* Fix plot, legend, warning, and validation issues in donut RDD
- Conditional two-layer scatter: only show excluded/fit data distinction
when data is actually excluded; default case shows single "data" layer
- Fix Bayesian plot legend to include all labeled artists (donut
boundaries, threshold, scatter labels) instead of only posterior mean
- Fix malformed warning when filter_desc is empty on small datasets
- Use ValueError instead of DataException for donut_hole param validation
- Update tests to expect ValueError for donut_hole validation
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
f"Choice of bandwidth parameter has lead to only {len(filtered_data)} remaining datapoints. Consider increasing the bandwidth parameter.", # noqa: E501
0 commit comments