Fix TANF benefit cap across all 42 states#7435
Merged
Conversation
…ome from inflating benefits Fix NC TANF household size bare .sum() bug and add min_() caps to 38 state programs (AL, AK, AR, AZ, CA, CO, CT, DC, FL, HI, IA, IL, IN, KS, LA, MA, MD, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TX, UT, VT, WV, WY). Previously, negative countable income could produce benefits exceeding $1M per household, inflating total TANF microsimulation from ~$9B target to $17.9T. With this fix, max benefit per household is $25,084 (CA CalWORKs) and total TANF is ~$32B pre-takeup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7f838c8 to
23ec13f
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7435 +/- ##
============================================
- Coverage 100.00% 70.65% -29.35%
============================================
Files 4 3877 +3873
Lines 76 55970 +55894
Branches 1 277 +276
============================================
+ Hits 76 39547 +39471
- Misses 0 16422 +16422
- Partials 0 1 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
.sum()bug (summed across entire population instead of within SPM unit)min_(benefit, payment_standard)caps to 42 state TANF programs across both standard-named ({st}_tanf) and non-standard-named programs (AK ATAP, AR TEA, CT TFA, FL TCA, IA FIP, LA FITAP, MA TAFDC, MD TCA, MI FIP, MN MFIP, NE ADC, NH FANF, NJ WFNJ, NM Works, OH OWF, RI Works, UT FEP, VT Reach Up, WV Works, WY POWER)Impact
The remaining gap ($32B vs ~$9B target) is a takeup issue —
takes_up_tanf_if_eligiblecurrently defaults to True for all eligible SPM units. Companion PR PolicyEngine/policyengine-us-data#542 adds a 22% TANF takeup rate to the calibration pipeline, which would bring the total to ~$5-7B pre-calibration.Root cause
All state TANF formulas used
max_(payment_standard - countable_income, 0)which correctly prevents benefits when income exceeds the payment standard, but does NOT prevent benefits from exceeding the payment standard when countable income is negative (e.g., from deductions, labor supply responses, or data issues). The fix addsmin_(benefit, payment_standard)to cap the result.Additionally, NC's
nc_tanf_household_sizeused bare.sum()instead ofspm_unit.sum(), summing eligible members across the entire population (42,874) instead of within each SPM unit.Test plan
🤖 Generated with Claude Code