Skip to content

Add Census SPM work expense formulas#7960

Draft
MaxGhenis wants to merge 4 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/spm-work-expense-formula
Draft

Add Census SPM work expense formulas#7960
MaxGhenis wants to merge 4 commits intoPolicyEngine:mainfrom
MaxGhenis:codex/spm-work-expense-formula

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Apr 9, 2026

Summary

  • add Census SPM weekly work-expense history as a parameter series with primary-source metadata
  • add weeks_worked, spm_unit_work_expenses, and spm_unit_head_spouse_earned_cap
  • compute spm_unit_capped_work_childcare_expenses from the model formula instead of uprating the input directly

Validation

  • PYTHONPATH=. python3 -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/household/income/person/weeks_worked.yaml policyengine_us/tests/policy/baseline/household/expense/childcare/spm_unit_work_expenses.yaml policyengine_us/tests/policy/baseline/household/expense/childcare/spm_unit_capped_work_childcare_expenses.yaml -c policyengine_us
  • PYTHONPATH=. pytest -q policyengine_us/tests/policy/baseline/parameters/test_uprating_extensions.py
  • git diff --check

Notes

  • The weekly work-expense series comes from Census SPM technical documentation and the 2023/2024 poverty reports.
  • A raw CPS 2024 check suggests the capped-childcare variable is best interpreted as work_expenses + min(childcare_expenses, max(lower_earner_cap - work_expenses, 0)), not min(work_expenses + childcare_expenses, lower_earner_cap).
  • Paired data PR: Populate CPS inputs for SPM childcare formula policyengine-us-data#705.

@MaxGhenis
Copy link
Copy Markdown
Contributor Author

Alignment check against the official 2025 ASEC public-use file for 2024 looks strong after the latest childcare-cap fixes.

Direct raw-CPS reconstruction now gives:

  • SPM_WKXPNS weighted total ratio: 1.00185
  • SPM_CAPWKCCXPNS weighted total ratio: 0.99958
  • SPM_CAPWKCCXPNS positive-unit MAE: about $17
  • SPM_CAPWKCCXPNS positive-unit share within $1: about 97.22%

So the formula now appears directionally and aggregately aligned to Census. The remaining gap is a narrow unit-level tail, not a broad bias.

Current tail read:

  • only about 12% of the top-100 cap misses are cohabiting units
  • cohabitors account for only about 9.8% of top-100 absolute cap error
  • the remaining misses are mostly in more complex non-cohabiting married/multi-adult SPM units

I filed the follow-up here to track that tail separately: #7961.

My read is that this PR is ship-ready, with the remaining work clearly scoped as a follow-up alignment issue rather than a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant