PolicyEngine / PolicyEngine/microcosm
Add HUD assisted-household controls and fix zero-valued HAP for receipt-anchored units
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
From scorecard diagnosis batch 1, item #6 (classification: pe_gap, confidence high; full memo: PolicyEngine/policyengine-scorecard diagnosis/DIAGNOSES.md).
Divergence
PE's <=80%-AMI SPM-unit denominator is 8.605M (51.3%) above Urban's <=50%-AMI household denominator. Applying Urban's rounded 26.0% rate to its 16.781M denominator implies 4.363M participants; PE has 0.689M positive HAP units, a 3.674M (84.2%) shortfall. A symmetric Shapley decomposition using those same rate-implied numerators assigns 5.10 points (21.9%) of the 23.286-point rate gap to the denominator concept and 18.18 points (78.1%) to participation/HAP, giving the 0.22/0.78 split. PE's $5.571B is at most about 11% of the documented $50B-plus benchmark.
Proposed fix
Housing is fully held out. Ingest a pinned HUD Picture of Subsidized Households state extract (Summary of All HUD Programs, number_reported, December point-in-time) with national and state household-count facts. Preserve the household-to-SPM-unit bridge explicitly and validate before binding. Add a separately sourced HUD expenditure/HAP control; publish receipt-flag mass, positive-HAP mass, total HAP, and mean positive HAP; and diagnose attrition from receipt anchors to positive HAP. Add a scorecard-only <=50%-AMI household denominator for a same-concept Urban comparison rather than changing the engine's broader statutory variable.
Evidence
- c80b6c4:data/comparison.json, housing/US/total rows: every quantity is held_out with calibration_basis 'zero housing targets'; PE reports 25,386,222 eligible SPM units and 2.714% participation versus Urban's 16,781,000 households and 26.0%.
- PEUS@92e6052d3e:policyengine_us/variables/gov/hud/is_eligible_for_housing_assistance.py:69-88 defines eligibility as current receipt or renter in especially-low, very-low, or low income levels, through 80% AMI.
- PEUS@92e6052d3e housing_assistance.py:4-18, hud_hap.py:4-18, and hud_max_subsidy.py:4-16 compute assistance as HAP times take-up, capped by payment standard or gross rent less tenant payment.
- POP@8828dee:packages/populace-build/src/populace/build/us_runtime/housing_inputs.py:1-20,491-520,974-1131 anchors take-up to measured CPS SPM_CAPHOUSESUB receipt (plus CPS-to-PUF prediction) and deliberately adds no unobserved recipients.
- POP@8828dee:packages/populace-build/src/populace/build/us/target_parity_manifest.json:513-521 records HUD housing assistance as a source-absent exclusion pending Ledger HUD ingest.
- data/pe/pe_metrics.json: PE has 25.386M eligible SPM units, 0.689M units with positive housing_assistance, and $5.571B HAP.
- docs/replication-assessment.md:85,113,124 benchmarks roughly 4.6M HUD-assisted households and more than $50B against PE's 0.69M positive units and $5.6B; it also identifies the needed <=50%-AMI variant.
- Archived policyengine-us-data@42ed5d45:policyengine_us_data/db/etl_housing_assistance.py:77-131 specifies HUD Picture of Subsidized Households, Summary of All HUD Programs, number_reported, as a December national/state assisted-household target.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/populace-build/src/populace/build/us_runtime/housing_inputs.py and the archived policyengine_us_data/db/etl_housing_assistance.py, then review target_parity_manifest.json and the referenced housing variables. Trace receipt anchors through positive housing_assistance and compare the existing metrics and replication assessment. Done means pinned HUD household and expenditure controls are ingested, validated, and the requested receipt, HAP, denominator, and attrition diagnostics are published.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100