Repository navigation
Description
What
Supply years_since_us_entry (Person, YEAR, float) in the default US build, derived from the CPS year-of-entry code PEINUSYR (and YOEP on ACS rows), so policyengine-us can stop relying on a default for it.
Why
years_since_us_entry feeds these policyengine-us formulas:
- the federal Medicaid five-year bar (8 USC 1613(a)), via
is_medicaid_immigration_status_eligible; - Washington TANF;
- the Missouri SSP waiting period;
- the Washington RCA window;
- the SNAP qualified-alien waiting period, pending in Apply the SNAP five-year waiting period and its exceptions to lawful permanent residents policyengine-us#9661.
Today it defaults to 5, so everyone counts as past the bar. PolicyEngine/policyengine-us#9732 removes that default, so the value becomes 0. That PR is a draft and is held until this issue lands.
The default build (populace_us_2024.h5@populace-us-2024-spm-20260909) has no years_since_us_entry column, but immigration_status_str is populated: 5,702 LPR records, or 11.03M weighted people. Without the column, every one of them would fail the Medicaid bar once the default is removed. With the current default of 5, recent entrants pass it wrongly. Neither default fits the population.
The build already carries the raw CPS PEINUSYR code. By an unverified reading of the code bands, about 26% of weighted LPRs (2.86M) entered in 2020 or later.
Proposed approach
- Map each
PEINUSYRband to years since entry for the data year, using the CPS ASEC codebook. Every bar compares>= 5, so a band that straddles 5 years needs an explicit rule, e.g. a seeded draw within the band, not a midpoint that lands on one side. - On ACS rows, use
YOEP(exact year of entry): data year − YOEP. - Fill it for non-citizens only. Citizens short-circuit every consumer, so their value doesn't matter.
- Register the column and document the semantics: year of physical entry. It overstates years in qualified-alien status for people who adjusted from a visa or unauthorized status. The SNAP and Medicaid bars count from obtaining qualified status, so the derived value under-applies the bar for adjusters, which is the conservative direction.
Related
#1020 item 3 proposes the same derivation (YOEP on ACS rows, PEINUSYR on ASEC rows) as part of fixing immigration status on the ACS local lane. This issue covers the default build, whose ASEC rows already carry immigration_status_str and PEINUSYR; it is the one that blocks PolicyEngine/policyengine-us#9732. Close whichever lands second.
Acceptance
- The default build has
years_since_us_entrypopulated for non-citizen records. - The weighted distribution for LPRs is reported, including the share under 5 years.
- The Remove the years_since_us_entry default of 5 policyengine-us#9732 microsim check shows LPR Medicaid eligibility driven by the data, not by a default.
🤖 Generated with Claude Code
Activity
DTrim99 commentedon Oct 1, 2026
Duplicate of #776, which already proposes storing years_since_us_entry from PEINUSYR and records the ICHIA prerequisite. Context moved there.