Add survey real-data validation against R (API, NHANES, RECS)#266
Closed
Add survey real-data validation against R (API, NHANES, RECS)#266
Conversation
Validate diff-diff's survey variance estimation against R's survey package using three real-world datasets: California API (strata+FPC), NHANES ACA young adult coverage (strata+PSU+nest), and RECS 2020 (JK1 replicate weights). All 15 tests match R to machine precision (<1e-10 differences). Includes R benchmark scripts, Python download scripts, golden value JSON files, and a real-data section in the survey tutorial demonstrating the ACA dependent coverage provision DiD on actual CDC data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
Author
|
/ai-review |
Golden JSON files (4.3MB) and notebook outputs exceeded Codex's 1MB character limit. Exclude benchmarks/data/**/*.json, *.csv, and docs/tutorials/*.ipynb from the unified diff while keeping them in the --stat summary so the reviewer knows they changed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
Author
|
/ai-review |
1 similar comment
Owner
Author
|
/ai-review |
Owner
Author
|
/ai-review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
surveypackage using three real federal survey datasetsapistratdatasetdocs/benchmarks.rstwith reproduction instructionsMethodology references
Validation
tests/test_survey_real_data.py(15 tests + 1 skip)benchmarks/R/benchmark_realdata_{api,nhanes,recs}.Rdocs/tutorials/16_survey_did.ipynb(Section 10: real NHANES data)Security / privacy
Generated with Claude Code