Skip to content

Commit 7f385dd

Browse files
authored
Merge pull request #267 from igerber/survey-real-data-validation
Add survey real-data validation against R using federal survey datasets
2 parents ac9c768 + ceee94c commit 7f385dd

17 files changed

Lines changed: 270623 additions & 96 deletions

.github/workflows/ai_pr_review.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,13 @@ jobs:
147147
echo "Changed files:"
148148
git --no-pager diff --name-status "$BASE_SHA" "$HEAD_SHA"
149149
echo ""
150-
# Identify large data files excluded from the unified diff
151-
EXCLUDED_GLOBS="benchmarks/data/real/*.json benchmarks/data/real/*.csv"
152-
excluded_files=$(git --no-pager diff --name-only "$BASE_SHA" "$HEAD_SHA" -- $EXCLUDED_GLOBS)
153-
if [ -n "$excluded_files" ]; then
154-
echo "NOTE: The following files are excluded from the unified diff below"
155-
echo "due to size (they are generated data/golden-value files). Their"
156-
echo "filenames appear in the 'Changed files' list above, but their"
157-
echo "content is NOT shown. Review coverage for these files is metadata-only."
158-
echo "$excluded_files" | sed 's/^/ - /'
159-
echo ""
160-
fi
161150
echo "Unified diff (context=5):"
151+
# Exclude large generated/data files from the full diff to stay
152+
# within the model's input limit. The --name-status above still
153+
# lists them. Narrowed to real-data assets and notebook outputs.
162154
git --no-pager diff --unified=5 "$BASE_SHA" "$HEAD_SHA" \
163-
-- . ':!benchmarks/data/real/*.json' ':!benchmarks/data/real/*.csv'
155+
-- . ':!benchmarks/data/real/*.json' ':!benchmarks/data/real/*.csv' \
156+
':!docs/tutorials/*.ipynb'
164157
} >> "$PROMPT"
165158
166159
- name: Run Codex

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Thumbs.db
5555

5656
# Benchmarks - generated data and results (can be regenerated)
5757
benchmarks/data/synthetic/*.csv
58+
benchmarks/data/real/raw/
5859
benchmarks/results/
5960

6061
# Rust build artifacts

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- **Survey real-data validation** (Phase 9) — 15 cross-validation tests against R's `survey` package using three real federal survey datasets:
12+
- **API** (R `survey` package): TSL variance with strata, FPC, subpopulations, covariates, and Fay's BRR replicates
13+
- **NHANES** (CDC/NCHS): TSL variance with strata + PSU + nest=TRUE, validating the ACA young adult coverage provision DiD
14+
- **RECS 2020** (U.S. EIA): JK1 replicate weight variance with 60 pre-computed replicate columns
15+
- ATT, SE, df, and CI match R to machine precision (< 1e-10) where directly comparable; known deviations documented in REGISTRY.md (TWFE SE differs due to unit FE absorption; subpopulation df differs due to strata preservation)
16+
1017
## [2.8.4] - 2026-04-04
1118

1219
### Added

0 commit comments

Comments
 (0)