Skip to content

Zero imputed Medicare Part B premiums to restore TAXSIM parity#993

Open
PavelMakarchuk wants to merge 1 commit into
mainfrom
zero-imputed-medical-premiums
Open

Zero imputed Medicare Part B premiums to restore TAXSIM parity#993
PavelMakarchuk wants to merge 1 commit into
mainfrom
zero-imputed-medical-premiums

Conversation

@PavelMakarchuk

@PavelMakarchuk PavelMakarchuk commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Problem

TAXSIM has no medical-expense input, but PolicyEngine imputes Medicare Part B premiums for Medicare-enrolled people via medical_expense_health_insurance_premiums. When a record itemizes federally (e.g. a large mortgage forces itemization), that imputed amount flows through the federal itemized medical deduction into state medical exemptions/deductions, understating state tax relative to TAXSIM/TaxAct. This surfaced across several elderly-itemizer reports:

  • #985 (MA Schedule Y medical exemption)
  • #978 (OK Schedule 511-D itemized add-back)
  • #981 (OH medical AGI deduction)
  • #982 (OH — same)

Fix

Zero medical_expense_health_insurance_premiums per person in the Microsimulation runner (the CLI path) and the single-household input_mapper/yaml_generator paths, mirroring the existing zeroing of SSI/SNAP/TANF/Head Start. It is the only itemized-medical component with an imputation formula — other_medical_expenses and health_insurance_premiums_without_medicare_part_b are pure inputs that already default to zero.

Verification (NBER taxsimtest binary)

Issue Before After Reference
#981 OH $0.00 $321.41 binary $321.41
#982 OH $0.00 $330.83 binary $330.83
#978 OK $44.63 $83.20 TaxAct $83
#985 MA $246.08 $385.89 TaxAct ~$386

#981/#982 now match the binary to the penny. (#985 retains a separate ~$10 MA rental-deduction residual unrelated to this fix.)

Full test suite: 142 passed. test_mappers expectations updated for the new zeroed field.

Closes #979
Closes #984
Closes #985
Closes #978
Closes #981
Closes #982

🤖 Generated with Claude Code

TAXSIM has no medical-expense input, but PolicyEngine imputes Medicare
Part B premiums for Medicare-enrolled people via
`medical_expense_health_insurance_premiums`. When a record itemizes
federally (e.g. a large mortgage), that imputed amount flows through the
federal itemized medical deduction into state medical exemptions and
deductions, understating state tax versus TAXSIM/TaxAct.

Zero `medical_expense_health_insurance_premiums` per person in the
Microsimulation runner (the CLI path) and in the single-household
`input_mapper`/`yaml_generator` paths, mirroring the existing zeroing of
SSI/SNAP/TANF/Head Start. It is the only itemized-medical component with
an imputation formula; the others are pure inputs that already default to
zero.

Verified against the NBER taxsimtest binary:
  - taxsim #981 (OH): $0.00 -> $321.41  (binary $321.41)
  - taxsim #982 (OH): $0.00 -> $330.83  (binary $330.83)
  - taxsim #978 (OK): $44.63 -> $83.20  (TaxAct $83)
  - taxsim #985 (MA): $246.08 -> $385.89 (TaxAct ~$386)

Updates test_mappers expected situations for the new zeroed field.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-taxsim Ready Ready Preview, Comment Jun 16, 2026 3:05am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant