Use rules-based Medicare Part B in SPM medical out-of-pocket expenses#8104
Merged
Use rules-based Medicare Part B in SPM medical out-of-pocket expenses#8104
Conversation
Wires the existing `income_adjusted_part_b_premium` (base + IRMAA by MAGI 2 years prior, per filing status) into `spm_unit_medical_out_of_pocket_expenses` in place of the CPS-imputed `medicare_part_b_premiums` that ships in person-level MOOP. Subtracts the imputed figure and adds the rules-based figure so per-family Medicare Part B in SPM resources is driven by statute, not CPS noise, and reforms to the base premium or IRMAA thresholds (e.g. moving the surcharge tier cutoffs) propagate through SPM poverty measurement. Person-level `medical_out_of_pocket_expenses` is unchanged; SNAP excess medical deduction and state itemized medical deductions continue to see the imputed person-level figure. Closes half of #8095.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8104 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 18 1 -17
Lines 353 14 -339
Branches 4 0 -4
==========================================
- Hits 353 14 -339
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes half of #8095.
Context
PolicyEngine-US already has a rules-based Medicare Part B premium variable:
income_adjusted_part_b_premium(base premium + IRMAA surcharge by MAGI from 2 years prior, per filing status). It lives in `variables/gov/hhs/medicare/eligibility/part_b/`.But it's currently orphaned — nothing consumes it. The imputed `medicare_part_b_premiums` is what flows into `medical_out_of_pocket_expenses` via `health_insurance_premiums`.
Fix
In `spm_unit_medical_out_of_pocket_expenses` (the SPM-unit-level wrapper introduced by #8103), subtract the imputed figure and add the rules-based one:
```python
return (
imputed_moop
- imputed_medicare_part_b_premiums
+ computed_income_adjusted_part_b_premium
+ chip_premium
)
```
Baseline SPM now uses statute-driven Part B premium rather than CPS-imputed (removes per-family CPS noise). Reforms to the base premium or IRMAA thresholds propagate through SPM poverty measurement — previously they affected computed `income_adjusted_part_b_premium` but that variable was unused.
Person-level `medical_out_of_pocket_expenses` is untouched, so state itemized medical deductions and SNAP excess medical continue to see the imputed CPS figure.
Testing
Caveats
This does not yet touch the Person-level `medical_out_of_pocket_expenses`. Doing so would swap the imputed figure for rules-based across all consumers (state deductions, SNAP, etc.), which is a larger change and warrants a separate PR once we confirm the rules-based figure matches CMS-aggregate calibration for baseline.
Test plan