Map taxsim_pprofinc to SSTB self-employment income - #9307
Conversation
taxsim_pprofinc (TAXSIM v28) carried no formula and was documented as assumed zero, so every emulator run told TAXSIM no SSTB income exists. Map it to sstb_self_employment_income summed over the head and spouse, per the v28 primary-and-secondary definition. No double-boxing: taxsim_psemp reads self_employment_income, which excludes the SSTB variable. Fixes PolicyEngine/policyengine-taxsim#1141 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 5c62fe89833bceafa477e33ef74b95e6fe96fcc7)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9307 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 12 1 -11
Lines 161 12 -149
==========================================
- Hits 161 12 -149
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Closing without merge — Pavel is right that this targets the wrong layer. The TAXSIM mapping logic moved to the policyengine-taxsim emulator, whose current main already maps pprofinc/sprofinc → sstb_self_employment_income (variable_mappings.yaml, with the §199A(d)(3) phaseout note) and sums psemp+pbusinc into self_employment_income per Feenberg's spec that businc ≡ semp. The pe-us contrib/taxsim variables this PR edited are a legacy copy; my "assumed zero" finding described that stale layer, not the live emulator. No pe-us change needed. |
taxsim_pprofinc(TAXSIM v28, SSTB income of the primary and secondary taxpayer) carried no formula and was labeled "Assumed zero" — so every emulator comparison told TAXSIM no SSTB income exists, while the SSTB slice also never reachedtaxsim_psemp(which readsself_employment_income, the non-SSTB variable). SSTB income simply vanished from TAXSIM inputs.This maps
taxsim_pprofinc = sstb_self_employment_incomesummed over the head and spouse per the v28 definition. No double-boxing (Feenberg's rule from the 2026-07-24 meeting): psemp already excludes the SSTB variable. With the Microcosm occupation-classified SSTB split (Microcosm #530), the QBID comparison becomes meaningful above the thresholds for the first time.Tests: zero without SSTB income, head-only mapping, and head+spouse summation with dependent exclusion.
Fixes PolicyEngine/policyengine-taxsim#1141
🤖 Generated with Claude Code