Skip to content

Latest commit

 

History

History
92 lines (62 loc) · 3.06 KB

countries.md

File metadata and controls

92 lines (62 loc) · 3.06 KB
title Country models

The policyengine package is country-agnostic; country-specific rules live in separate packages (policyengine-us, policyengine-uk). This page captures the differences that matter to users.

Entities

US UK
person person
family —
marital_unit —
tax_unit benunit
spm_unit —
household household

The UK benunit is the closest analog to the US tax_unit for means-testing — a single adult or married couple plus dependent children.

Default income variable

Net-income calculations use country-specific defaults:

Variable
US spm_unit_net_income
UK hbai_household_net_income

Override in any output with income_variable=.

Default dataset

Dataset
US Populace US 2024 (populace_us_2024.h5)
UK Enhanced FRS 2024-25 (enhanced_frs_2024_25.h5, policyengine-uk-data)

State / regional breakdown

US: Populace row scoping uses state_fips and congressional_district_geoid. state_code remains the human-readable state input for custom households. US resource and poverty calculations also require observed county_fips or an explicit national or SPM-area choice; see Households.

UK: constituency code and local authority code on every household where available.

Poverty

US: SPM (Supplemental Poverty Measure) and deep SPM (below half the threshold). Tracked measures are listed in US_POVERTY_VARIABLES.

UK: AHC (After Housing Costs) and BHC (Before Housing Costs), both relative (60 % of median) and absolute.

Reform targeting

Parameter paths mirror the country's rule-making structure:

  • US: gov.irs.*, gov.states.<st>.*, gov.usda.*, gov.hhs.*
  • UK: gov.hmrc.*, gov.dwp.*, gov.obr.*

See Reforms for how to express changes in either tree.

Methodology and programs

Country-specific methodology pages explain model structure that is too broad for a generated variable reference. Current US pages include health coverage and costs.

Program pages explain eligibility and benefit structure. Current US pages include CHIP.

Switching countries

Most analysis patterns are identical — swap pe.us for pe.uk:

# US
pe.us.calculate_household(
    people=[{"age": 35, "employment_income": 60_000}],
    tax_unit={"filing_status": "SINGLE"},
    household={"state_code": "CA", "county_fips": "06037"},
    year=2026,
)

# UK
pe.uk.calculate_household(
    people=[{"age": 35, "employment_income": 50_000}],
    year=2026,
)

Microsim is similarly parallel: pe.us.ensure_datasets / pe.uk.ensure_datasets, Simulation(tax_benefit_model_version=pe.us.model) / pe.uk.model.

Pinned versions

Each policyengine release pins specific policyengine-us and policyengine-uk versions. Check them via pe.us.model.manifest and pe.uk.model.manifest. If the installed country package version diverges, the model warns — see Release bundles.