Skip to content

Derive other health insurance premiums#844

Draft
daphnehanse11 wants to merge 7 commits intomainfrom
codex/issue-8089-moop-premium-residualization
Draft

Derive other health insurance premiums#844
daphnehanse11 wants to merge 7 commits intomainfrom
codex/issue-8089-moop-premium-residualization

Conversation

@daphnehanse11
Copy link
Copy Markdown
Collaborator

@daphnehanse11 daphnehanse11 commented Apr 28, 2026

Summary

  • Requires policyengine-us>=1.673.0, the release expected to include Decompose SPM MOOP premiums policyengine-us#8178's clean MOOP variables.
  • Adds a CPS data-generation step that derives other_health_insurance_premiums from reported non-Medicare health insurance premiums after subtracting baseline modeled Marketplace, CHIP, and Medicaid premiums.
  • Uses the clean medicare_part_b_premium target/input surface directly and stops exporting legacy reported medicare_part_b_premiums from CPS.
  • Allocates tax-unit-level computed premiums to person rows before deriving the other-premium input, and keeps the original CPS-reported premium fields available as source inputs.

Addresses PolicyEngine/policyengine-us#8089.

Notes

This should merge after PolicyEngine/policyengine-us#8178 is merged and released as policyengine-us>=1.673.0. Until that release exists, dependency resolution is expected to fail because the latest published policyengine-us is 1.672.0 and does not define other_health_insurance_premiums or medicare_part_b_premium.

The SPM premium stack is other_health_insurance_premiums plus modeled Marketplace, CHIP, Medicaid, and Medicare Part B premiums.

Tests

  • .venv/bin/python -m pytest tests/unit/test_medical_expense_inputs.py tests/unit/datasets/test_other_health_insurance_premiums.py tests/unit/calibration/test_target_config.py -q
  • .venv/bin/ruff format --check pyproject.toml policyengine_us_data/utils/policyengine.py policyengine_us_data/datasets/cps/cps.py policyengine_us_data/db/etl_national_targets.py policyengine_us_data/storage/calibration_targets/pull_hardcoded_targets.py policyengine_us_data/utils/loss.py policyengine_us_data/datasets/puf/puf.py tests/unit/test_medical_expense_inputs.py tests/unit/calibration/test_target_config.py tests/unit/datasets/test_other_health_insurance_premiums.py && .venv/bin/ruff check policyengine_us_data/utils/policyengine.py policyengine_us_data/datasets/cps/cps.py policyengine_us_data/db/etl_national_targets.py policyengine_us_data/storage/calibration_targets/pull_hardcoded_targets.py policyengine_us_data/utils/loss.py policyengine_us_data/datasets/puf/puf.py tests/unit/test_medical_expense_inputs.py tests/unit/calibration/test_target_config.py tests/unit/datasets/test_other_health_insurance_premiums.py
  • git diff --check
  • Expected until #8178 release: env -u UV_FROZEN uv lock --locked fails because policyengine-us>=1.673.0 is not published yet.

@MaxGhenis MaxGhenis changed the title Residualize modeled health premiums Derive other health insurance premiums Apr 29, 2026
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.

2 participants