Skip to content

Calibrate ACA take-up contract#8352

Closed
daphnehanse11 wants to merge 1 commit into
PolicyEngine:mainfrom
daphnehanse11:codex/issue-8168-marketplace-takeup-ratios
Closed

Calibrate ACA take-up contract#8352
daphnehanse11 wants to merge 1 commit into
PolicyEngine:mainfrom
daphnehanse11:codex/issue-8168-marketplace-takeup-ratios

Conversation

@daphnehanse11

@daphnehanse11 daphnehanse11 commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • derive takes_up_aca_if_eligible from reported Marketplace coverage or a data-supplied/simulated take-up switch
  • add simulated_aca_take_up_if_eligible so Populace and other datasets can provide calibrated non-reported Marketplace take-up without writing the final formula-owned take-up variable
  • document selected_marketplace_plan_benchmark_ratio as an explicit user/data input, defaulting to the benchmark-plan assumption when absent
  • add tests for observed Marketplace take-up and an unsubsidized reported Marketplace buyer using a selected-plan ratio below the benchmark

Closes #8168.

Data framework note

Under the Populace-style contract, has_marketplace_health_coverage_at_interview remains the observed coverage input, simulated_aca_take_up_if_eligible is the data-supplied/calibrated take-up input for tax units without reported Marketplace coverage, and takes_up_aca_if_eligible is computed by PolicyEngine-US. Populace should therefore write simulated_aca_take_up_if_eligible, not takes_up_aca_if_eligible, once this lands.

Tests

  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/aca/takes_up_aca_if_eligible.yaml policyengine_us/tests/policy/baseline/gov/aca/person_receives_aca.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/marketplace_net_premium.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/selected_marketplace_plan_premium_proxy.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/used_aca_ptc.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/assigned_aca_ptc.yaml -c policyengine_us
  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/aca -c policyengine_us
  • uv run pytest policyengine_us/tests/test_parameter_files.py -q
  • uv run --extra dev ruff check policyengine_us/variables/gov/aca policyengine_us/tests/policy/baseline/gov/aca
  • uv run --extra dev ruff format --check policyengine_us/variables/gov/aca/takes_up_aca_if_eligible.py policyengine_us/variables/gov/aca/simulated_aca_take_up_if_eligible.py policyengine_us/variables/gov/aca/ptc/selected_marketplace_plan_benchmark_ratio.py
  • git diff --check

@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (206b9e7) to head (09b160d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8352   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         3    -5     
  Lines          127        30   -97     
=========================================
- Hits           127        30   -97     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@daphnehanse11 daphnehanse11 force-pushed the codex/issue-8168-marketplace-takeup-ratios branch from b53dcb3 to 09b160d Compare June 17, 2026 21:02
@daphnehanse11 daphnehanse11 marked this pull request as ready for review June 17, 2026 21:05
@daphnehanse11 daphnehanse11 requested a review from MaxGhenis June 17, 2026 21:25
@MaxGhenis

Copy link
Copy Markdown
Contributor

Reviewed in depth (agent-assisted). Technically clean (green CI on the current head, clean merge against today's main, 22 ACA tests pass post-merge, single-household default stays deterministically true) — but holding merge for a contract decision:

  1. The seam contradicts the newer direction. The Feb 2026 deterministic-country-package change made take-up variables formula-less with data-package randomness, and Retire legacy Marketplace coverage input #8693's partner guidance says simulated ACA take-up should write takes_up_aca_if_eligible directly — the opposite of this PR's simulated_aca_take_up_if_eligible pass-through, which exists nowhere else on main or in the newer health PRs. Whichever contract survives should be decided once, and this PR reconciled with Retire legacy Marketplace coverage input #8693 rather than landing a competing seam.

  2. No calibration despite the title — no probability parameter, target, or citation; the diff delivers the explicit-input path only. Fine on its own, but Calibrate Marketplace take-up and selected-plan premium ratios #8168's calibrated-take-up half remains open either way.

Suggest folding the observed-coverage-informs-take-up behavior into the #8693 line of work.

@MaxGhenis

Copy link
Copy Markdown
Contributor

Closing as superseded by the author's own newer contract direction: the Feb 2026 deterministic-country-package architecture made take-up variables formula-less with data-package randomness, and #8693's partner guidance states simulated ACA take-up should write takes_up_aca_if_eligible directly — the opposite of this PR's simulated_aca_take_up_if_eligible pass-through seam, which nothing else on main or in the newer health PRs references. The observed-coverage-informs-take-up behavior is worth folding into the #8693 line of work (detailed findings in the review comment above). Happy to reopen if the contract decision goes the other way.

@MaxGhenis MaxGhenis closed this Jul 5, 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.

Calibrate Marketplace take-up and selected-plan premium ratios

2 participants