Zero imputed Medicare Part B premiums to restore TAXSIM parity#993
Open
PavelMakarchuk wants to merge 1 commit into
Open
Zero imputed Medicare Part B premiums to restore TAXSIM parity#993PavelMakarchuk wants to merge 1 commit into
PavelMakarchuk wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 16, 2026
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.
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:Fix
Zero
medical_expense_health_insurance_premiumsper person in the Microsimulation runner (the CLI path) and the single-householdinput_mapper/yaml_generatorpaths, mirroring the existing zeroing of SSI/SNAP/TANF/Head Start. It is the only itemized-medical component with an imputation formula —other_medical_expensesandhealth_insurance_premiums_without_medicare_part_bare pure inputs that already default to zero.Verification (NBER
taxsimtestbinary)#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_mappersexpectations updated for the new zeroed field.Closes #979
Closes #984
Closes #985
Closes #978
Closes #981
Closes #982
🤖 Generated with Claude Code