Skip to content

Add TANF take-up to microdata construction#536

Open
MaxGhenis wants to merge 3 commits intomainfrom
add-tanf-takeup
Open

Add TANF take-up to microdata construction#536
MaxGhenis wants to merge 3 commits intomainfrom
add-tanf-takeup

Conversation

@MaxGhenis
Copy link
Contributor

Summary

Adds state-level TANF takeup rates to the microdata construction pipeline, following the same pattern as Medicaid and SNAP. This is the data-side prerequisite for removing the tanf_reported short-circuit from policyengine-us (#7400).

Closes #535

Changes

New file: parameters/take_up/tanf.yaml

  • State-level takeup rate priors for all 50 states + DC
  • Derived from ACF FY2023 TANF caseload data (average monthly families by state) divided by Census ACS 2023 families in poverty
  • Scaled ~2x to approximate takeup among eligible families (eligible pool ≈ 50% of poverty pool due to asset tests, work requirements, time limits)
  • Rates range from 0.03 (AR) to 0.91 (CA), reflecting massive state-level variation in TANF accessibility

Modified: datasets/cps/cps.py

  • Load TANF state-specific rates via load_take_up_rate("tanf", ...)
  • Map SPM units to states (via household → state lookup), reused by Medicaid block
  • Assign takes_up_tanf_if_eligible boolean to each SPM unit using deterministic seeded RNG

Calibration

The existing tanf: 9e9 hardcoded target in pull_hardcoded_targets.py will calibrate total TANF spending. The takeup priors determine which households receive TANF in the microsim; calibration adjusts weights to match the $9B national target.

Companion work needed (policyengine-us)

  1. Add takes_up_tanf_if_eligible variable (bool, SPMUnit, default_value = True)
  2. Wire all 39 state TANF programs into tanf.py (currently only 4 of 39)
  3. Apply takeup in TANF formula: value * takes_up
  4. Remove the tanf_reported short-circuit

See policyengine-us#7400.

Test plan

  • tanf.yaml loads correctly via load_take_up_rate("tanf", 2023)
  • add_takeup() assigns takes_up_tanf_if_eligible to all SPM units
  • State mapping produces correct rates (spot-check CA ≈ 0.91, TX ≈ 0.04)
  • Existing takeup assignments (SNAP, Medicaid, etc.) unaffected

🤖 Generated with Claude Code

Add state-level TANF takeup rates derived from ACF FY2023 caseload
data and Census ACS poverty estimates, following the same pattern as
Medicaid (state-specific rates) and SNAP (SPM unit level assignment).

Priors are TANF-to-poverty ratios scaled ~2x to approximate takeup
among eligible families. These will be adjusted during calibration
against the existing $9B national cash assistance target.

Closes #535

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MaxGhenis added a commit to PolicyEngine/policyengine-us that referenced this pull request Feb 14, 2026
…-circuit

- Add `takes_up_tanf_if_eligible` variable (bool, SPMUnit, default True)
- Wire all 39 implemented state TANF programs into tanf.py:
  26 with standard naming ({st}_tanf) and 13 with program-specific
  names (ak_atap, ct_tfa, fl_tca, ia_fip, md_tca, mi_fip, mn_mfip,
  nj_wfnj, nm_works, ri_works, vt_reach_up, wi_works, wv_works)
- Apply takeup in TANF formula: value * takes_up
- Remove tanf_reported short-circuit that blocked reform microsimulations
- Update tests for new behavior

Companion to PolicyEngine/policyengine-us-data#536 which adds
state-level TANF takeup rates to microdata construction.

Closes #7400

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MaxGhenis and others added 2 commits February 13, 2026 16:29
- Separate shared state lookup from TANF-specific logic
- Remove unnecessary intermediate variables
- Replace redundant .get() fallback with direct dict access
- Update docstring to reflect TANF as rates_by_state consumer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MaxGhenis added a commit to PolicyEngine/policyengine-us that referenced this pull request Feb 16, 2026
…-circuit

- Add `takes_up_tanf_if_eligible` variable (bool, SPMUnit, default True)
- Wire all 39 implemented state TANF programs into tanf.py:
  26 with standard naming ({st}_tanf) and 13 with program-specific
  names (ak_atap, ct_tfa, fl_tca, ia_fip, md_tca, mi_fip, mn_mfip,
  nj_wfnj, nm_works, ri_works, vt_reach_up, wi_works, wv_works)
- Apply takeup in TANF formula: value * takes_up
- Remove tanf_reported short-circuit that blocked reform microsimulations
- Update tests for new behavior

Companion to PolicyEngine/policyengine-us-data#536 which adds
state-level TANF takeup rates to microdata construction.

Closes #7400

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MaxGhenis added a commit to MaxGhenis/policyengine-us that referenced this pull request Feb 16, 2026
…-circuit

- Add `takes_up_tanf_if_eligible` variable (bool, SPMUnit, default True)
- Wire all 39 implemented state TANF programs into tanf.py:
  26 with standard naming ({st}_tanf) and 13 with program-specific
  names (ak_atap, ct_tfa, fl_tca, ia_fip, md_tca, mi_fip, mn_mfip,
  nj_wfnj, nm_works, ri_works, vt_reach_up, wi_works, wv_works)
- Apply takeup in TANF formula: value * takes_up
- Remove tanf_reported short-circuit that blocked reform microsimulations
- Update tests for new behavior

Companion to PolicyEngine/policyengine-us-data#536 which adds
state-level TANF takeup rates to microdata construction.

Closes PolicyEngine#7400

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Add TANF take-up to microdata construction

1 participant