policyengine-us 1.439.0__py3-none-any.whl → 1.449.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- policyengine_us/parameters/calibration/gov/hhs/medicare/per_capita_cost.yaml +12 -0
- policyengine_us/parameters/gov/contrib/states/ut/eitc/in_effect.yaml +9 -0
- policyengine_us/parameters/gov/contrib/states/ut/eitc/max_age.yaml +9 -0
- policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/medically_needy/categories/child/child.yaml +0 -1
- policyengine_us/parameters/gov/hhs/medicare/part_a/deductible.yaml +13 -0
- policyengine_us/parameters/gov/hhs/medicare/part_a/default_quarters_of_coverage.yaml +10 -0
- policyengine_us/parameters/gov/hhs/medicare/part_a/full_premium.yaml +13 -0
- policyengine_us/parameters/gov/hhs/medicare/part_a/premium_free_quarters_threshold.yaml +10 -0
- policyengine_us/parameters/gov/hhs/medicare/part_a/reduced_premium.yaml +13 -0
- policyengine_us/parameters/gov/hhs/medicare/part_a/reduced_premium_quarters_threshold.yaml +10 -0
- policyengine_us/parameters/gov/hhs/medicare/part_b/base_premium.yaml +16 -0
- policyengine_us/parameters/gov/hhs/medicare/part_b/irmaa/head_of_household.yaml +50 -0
- policyengine_us/parameters/gov/hhs/medicare/part_b/irmaa/joint.yaml +49 -0
- policyengine_us/parameters/gov/hhs/medicare/part_b/irmaa/separate.yaml +30 -0
- policyengine_us/parameters/gov/hhs/medicare/part_b/irmaa/single.yaml +50 -0
- policyengine_us/parameters/gov/hhs/medicare/part_b/irmaa/surviving_spouse.yaml +49 -0
- policyengine_us/parameters/gov/irs/credits/cdcc/eligibility/child_age.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/clean_vehicle/new/eligibility/min_kwh.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/clean_vehicle/used/eligibility/sale_price_limit.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/education/american_opportunity_credit/abolition.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/education/american_opportunity_credit/refundability.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/education/lifetime_learning_credit/abolition.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/education/lifetime_learning_credit/expense_limit.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/advanced_main_air_circulating_fan.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/door.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/energy_efficient_central_air_conditioner.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/heat_pump_heat_pump_water_heater_biomass_stove_boiler.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/home_energy_audit.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/qualified_furnace_or_hot_water_boiler.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/roof.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/total.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/annual/window.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/lifetime/total.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/cap/lifetime/window.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/in_effect.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/qualified_expenditures/credits.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/qualified_expenditures/heat_pump_heat_pump_water_heater_biomass_stove_boiler.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/rates/home_energy_audit.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/rates/improvements.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/energy_efficient_home_improvement/rates/property.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/premium_tax_credit/phase_out/ending_rate.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/premium_tax_credit/phase_out/starting_rate.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/arpa/max/adult.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/arpa/max/dependent.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/arpa/phase_out/length.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/arpa/phase_out/threshold.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/caa/max/adult.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/caa/max/child.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/caa/phase_out/rate.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/caa/phase_out/threshold.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/cares/max/adult.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/cares/max/child.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/cares/phase_out/rate.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/recovery_rebate_credit/cares/phase_out/threshold.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/residential_clean_energy/applicable_percentage.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/residential_clean_energy/elements.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/residential_clean_energy/fuel_cell_cap_per_kw.yaml +0 -1
- policyengine_us/parameters/gov/irs/deductions/standard/aged_or_blind/age_threshold.yaml +0 -1
- policyengine_us/parameters/gov/irs/payroll/medicare/additional/exclusion.yaml +0 -1
- policyengine_us/parameters/gov/local/ny/mamdani_income_tax/in_effect.yaml +10 -0
- policyengine_us/parameters/gov/local/ny/mamdani_income_tax/rate.yaml +18 -0
- policyengine_us/parameters/gov/states/ar/tax/income/rates/main/reduction.yaml +30 -0
- policyengine_us/parameters/gov/states/co/tax/income/credits/care_worker/amount/{single.yaml → non_joint.yaml} +2 -2
- policyengine_us/parameters/gov/states/co/tax/income/credits/care_worker/income_limit/{single.yaml → non_joint.yaml} +2 -2
- policyengine_us/parameters/gov/states/il/hfs/README.md +1 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/README.md +1 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/age.yaml +25 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/asset/limit.yaml +15 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/income/limit.yaml +15 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/income/sources/earned.yaml +13 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/income/sources/unearned.yaml +25 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/eligibility/qualified_noncitizen_statuses.yaml +21 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/premium/earned.yaml +96 -0
- policyengine_us/parameters/gov/states/il/hfs/hbwd/premium/unearned.yaml +96 -0
- policyengine_us/parameters/gov/states/mt/tax/income/deductions/itemized/spouse_allocation_rate.yaml +13 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/income/deductions/earned_income_disregard/amount.yaml +14 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/income/deductions/earned_income_disregard/percentage_disregarded.yaml +14 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/income/limit.yaml +36 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/maximum_family_size.yaml +14 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/payment_standard/amount.yaml +32 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/payment_standard/maximum_amount.yaml +12 -0
- policyengine_us/parameters/gov/states/wa/dshs/tanf/resource_limit.yaml +15 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/gradual_adjustment/adjustment_limit_basis.yaml +12 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/gradual_adjustment/exemption_rate.yaml +13 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/gradual_adjustment/rate.yaml +12 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/gradual_adjustment/threshold.yaml +13 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/regular_tax/percentage.yaml +21 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/deductions/sources.yaml +18 -0
- policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/sources.yaml +15 -0
- policyengine_us/parameters/gov/usda/snap/student/child_age_limit/single_parent.yaml +12 -0
- policyengine_us/parameters/gov/usda/snap/student/child_age_limit/two_parent.yaml +12 -0
- policyengine_us/parameters/simulation/disabled_programs.yaml +0 -1
- policyengine_us/reforms/local/ny/__init__.py +4 -0
- policyengine_us/reforms/local/ny/mamdani_income_tax.py +84 -0
- policyengine_us/reforms/reforms.py +14 -0
- policyengine_us/reforms/states/ut/__init__.py +3 -0
- policyengine_us/reforms/states/ut/ut_refundable_eitc.py +118 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/costs/medicare_cost.yaml +65 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/eligibility/base_part_a_premium.yaml +35 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/eligibility/base_part_b_premium.yaml +15 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/eligibility/income_adjusted_part_b_premium.yaml +77 -0
- policyengine_us/tests/policy/baseline/gov/irs/tax/federal_income/alternative_minimum_tax/exemption/amt_exemption.yaml +68 -0
- policyengine_us/tests/policy/baseline/gov/irs/tax/federal_income/alternative_minimum_tax/integration.yaml +26 -0
- policyengine_us/tests/policy/baseline/gov/states/ar/tax/income/integration.yaml +35 -0
- policyengine_us/tests/policy/baseline/gov/states/co/tax/income/additions/federal_deduction/co_federal_deduction_addback.yaml +2 -2
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/asset/il_hbwd_countable_assets.yaml +23 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_age_eligible.yaml +39 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_asset_eligible.yaml +31 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_disability_eligible.yaml +35 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_eligible.yaml +65 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_employment_eligible.yaml +34 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_immigration_status_eligible.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_income_eligible.yaml +25 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/il_hbwd_person.yaml +34 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/il_hbwd_premium.yaml +84 -0
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/integration.yaml +183 -0
- policyengine_us/tests/policy/baseline/gov/states/ma/dta/ssp/ma_state_supplement.yaml +2 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/deductions/mo_federal_income_tax_deduction.yaml +2 -14
- policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/deductions/mo_pension_and_ss_or_ssd_deduction/mo_pension_and_ss_or_ssd_deduction_section_a.yaml +2 -2
- policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/deductions/mo_pension_and_ss_or_ssd_deduction/mo_pension_and_ss_or_ssd_deduction_section_b.yaml +1 -1
- policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/deductions/mo_pension_and_ss_or_ssd_deduction/mo_pension_and_ss_or_ssd_deduction_section_c.yaml +1 -1
- policyengine_us/tests/policy/baseline/gov/states/nc/tax/income/deductions/nc_itemized_deductions.yaml +2 -2
- policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_qualifying_income.yaml +29 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/tax/income/integration.yaml +82 -0
- policyengine_us/tests/policy/baseline/gov/states/ut/tax/income/credits/ss_benefits_credit/ut_ss_benefits_credit_max.yaml +5 -5
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/benefit/wa_tanf_payment_standard.yaml +48 -0
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/eligibility/wa_tanf_eligible.yaml +65 -0
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/eligibility/wa_tanf_income_eligible.yaml +96 -0
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/income/wa_tanf_countable_earned_income.yaml +70 -0
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/integration.yaml +676 -0
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/wa_tanf.yaml +102 -0
- policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/wa_tanf_resources_eligible.yaml +6 -7
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/gradual_adjustment/pr_gradual_adjustment_amount.yaml +29 -0
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/gradual_adjustment/pr_gradual_adjustment_eligible.yaml +15 -0
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/pr_agi.yaml +17 -0
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/pr_agi_person.yaml +17 -0
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/pr_tax_before_credits.yaml +19 -0
- policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/pr_net_taxable_income.yaml +26 -0
- policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/student/is_snap_higher_ed_student.yaml +23 -0
- policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/student/is_snap_ineligible_student.yaml +75 -4
- policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/student/meets_snap_parent_exception.yaml +345 -0
- policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/student/meets_snap_work_exception.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/usda/snap/income/federal_work_study_income_exclusion.yaml +24 -0
- policyengine_us/tests/policy/baseline/gov/usda/snap/income/snap_countable_earner.yaml +25 -0
- policyengine_us/tests/policy/baseline/gov/usda/wic/integration.yaml +181 -0
- policyengine_us/tests/policy/baseline/gov/usda/wic/is_wic_at_nutritional_risk.yaml +33 -0
- policyengine_us/tests/policy/baseline/gov/usda/wic/is_wic_eligible.yaml +28 -15
- policyengine_us/tests/policy/baseline/household/demographic/geographic/state_group.yaml +21 -0
- policyengine_us/tests/policy/contrib/local/ny/nyc_mamdani_income_tax.yaml +51 -0
- policyengine_us/tests/policy/contrib/states/ut/ut_refundable_eitc.yaml +214 -0
- policyengine_us/variables/gov/ed/is_federal_work_study_participant.py +9 -0
- policyengine_us/variables/gov/hhs/medicare/costs/medicare_cost.py +30 -0
- policyengine_us/variables/gov/hhs/medicare/costs/medicare_enrolled.py +14 -0
- policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/base_part_a_premium.py +32 -0
- policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/is_premium_free_part_a.py +22 -0
- policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/medicare_quarters_of_coverage.py +16 -0
- policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/base_part_b_premium.py +16 -0
- policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/income_adjusted_part_b_premium.py +55 -0
- policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/exemption/amt_exemption.py +47 -0
- policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/income/amt_income_less_exemptions.py +4 -22
- policyengine_us/variables/gov/states/ca/tax/income/alternative_minimum_tax/exemption/ca_amt_exemption.py +4 -2
- policyengine_us/variables/gov/states/ca/tax/income/ca_income_tax.py +1 -0
- policyengine_us/variables/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit.py +1 -1
- policyengine_us/variables/gov/states/co/tax/income/credits/care_worker/co_care_worker_credit_eligible.py +1 -1
- policyengine_us/variables/gov/states/il/hfs/hbwd/asset/il_hbwd_countable_assets.py +34 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_age_eligible.py +20 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_asset_eligible.py +21 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_disability_eligible.py +20 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_eligible.py +33 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_employment_eligible.py +25 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_immigration_status_eligible.py +26 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_income_eligible.py +23 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/il_hbwd.py +17 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/il_hbwd_person.py +24 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/il_hbwd_premium.py +23 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/income/earned/il_hbwd_countable_earned_income.py +24 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/income/earned/il_hbwd_gross_earned_income.py +16 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/income/il_hbwd_countable_income.py +21 -0
- policyengine_us/variables/gov/states/il/hfs/hbwd/income/unearned/il_hbwd_countable_unearned_income.py +16 -0
- policyengine_us/variables/gov/states/ma/dta/ssp/ma_state_supplement.py +1 -0
- policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/general/mt_itemized_deductions_indiv.py +3 -2
- policyengine_us/variables/gov/states/oh/tax/income/credits/joint_filing_credit/oh_joint_filing_credit_qualifying_income.py +7 -3
- policyengine_us/variables/gov/states/wa/dshs/tanf/benefit/wa_tanf_payment_standard.py +22 -0
- policyengine_us/variables/gov/states/wa/dshs/tanf/eligibility/wa_tanf_eligible.py +42 -0
- policyengine_us/variables/gov/states/wa/dshs/tanf/eligibility/wa_tanf_income_eligible.py +31 -0
- policyengine_us/variables/gov/states/wa/dshs/tanf/income/wa_tanf_countable_earned_income.py +33 -0
- policyengine_us/variables/gov/states/wa/dshs/tanf/income/wa_tanf_countable_income.py +16 -0
- policyengine_us/variables/gov/states/wa/dshs/tanf/wa_tanf.py +34 -0
- policyengine_us/variables/gov/states/wa/dshs/tanf/wa_tanf_resources_eligible.py +3 -2
- policyengine_us/variables/gov/territories/pr/tax/income/gradual_adjustment/pr_gradual_adjustment_amount.py +23 -0
- policyengine_us/variables/gov/territories/pr/tax/income/gradual_adjustment/pr_gradual_adjustment_eligible.py +16 -0
- policyengine_us/variables/gov/territories/pr/tax/income/pr_agi.py +11 -1
- policyengine_us/variables/gov/territories/pr/tax/income/pr_agi_person.py +11 -1
- policyengine_us/variables/gov/territories/pr/tax/income/pr_regular_tax_before_credits.py +9 -0
- policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/deductions/pr_deductions.py +13 -0
- policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/exemptions/pr_exemptions.py +13 -0
- policyengine_us/variables/gov/territories/pr/tax/income/taxable_income/pr_net_taxable_income.py +6 -0
- policyengine_us/variables/gov/usda/snap/eligibility/student/is_snap_higher_ed_student.py +17 -0
- policyengine_us/variables/gov/usda/snap/eligibility/student/is_snap_ineligible_student.py +47 -15
- policyengine_us/variables/gov/usda/snap/eligibility/student/meets_snap_parent_exception.py +42 -0
- policyengine_us/variables/gov/usda/snap/eligibility/student/meets_snap_work_exception.py +22 -0
- policyengine_us/variables/gov/usda/snap/income/snap_countable_earner.py +13 -2
- policyengine_us/variables/gov/usda/wic/is_wic_at_nutritional_risk.py +3 -10
- policyengine_us/variables/gov/usda/wic/is_wic_eligible.py +10 -1
- policyengine_us/variables/household/demographic/geographic/state_group.py +8 -5
- policyengine_us/variables/household/demographic/person/is_part_time_college_student.py +9 -0
- {policyengine_us-1.439.0.dist-info → policyengine_us-1.449.6.dist-info}/METADATA +1 -1
- {policyengine_us-1.439.0.dist-info → policyengine_us-1.449.6.dist-info}/RECORD +213 -90
- {policyengine_us-1.439.0.dist-info → policyengine_us-1.449.6.dist-info}/WHEEL +1 -1
- policyengine_us/parameters/gov/states/wa/dshs/tanf/eligibility/resources/limit.yaml +0 -11
- /policyengine_us/variables/gov/states/co/ssa/{state_suplement → state_supplement}/co_state_supplement.py +0 -0
- /policyengine_us/variables/gov/states/co/ssa/{state_suplement → state_supplement}/co_state_supplement_eligible.py +0 -0
- {policyengine_us-1.439.0.dist-info → policyengine_us-1.449.6.dist-info}/entry_points.txt +0 -0
- {policyengine_us-1.439.0.dist-info → policyengine_us-1.449.6.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,39 +1,52 @@
|
|
|
1
1
|
# WIC requires each of the following:
|
|
2
|
-
# -
|
|
3
|
-
# -
|
|
2
|
+
# - Being in a valid demographic category (pregnant, postpartum, breastfeeding, infant, or child),
|
|
3
|
+
# - Either meeting the income test or categorical eligibility, and
|
|
4
4
|
# - Being assessed to be at nutritional risk.
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
# Unit tests with stubbed inputs
|
|
7
|
+
- name: Case 1, child satisfies all conditions hence is eligible.
|
|
6
8
|
period: 2022
|
|
7
9
|
input:
|
|
10
|
+
wic_category: CHILD
|
|
8
11
|
meets_wic_income_test: true
|
|
9
|
-
meets_wic_categorical_eligibility: true
|
|
10
12
|
is_wic_at_nutritional_risk: true
|
|
11
13
|
output:
|
|
12
14
|
is_wic_eligible: true
|
|
13
15
|
|
|
14
|
-
- name: Case 2, not
|
|
16
|
+
- name: Case 2, healthy adult not eligible even with all other conditions met.
|
|
15
17
|
period: 2022
|
|
16
18
|
input:
|
|
19
|
+
wic_category: NONE
|
|
17
20
|
meets_wic_income_test: true
|
|
18
21
|
meets_wic_categorical_eligibility: true
|
|
19
|
-
is_wic_at_nutritional_risk:
|
|
22
|
+
is_wic_at_nutritional_risk: true
|
|
20
23
|
output:
|
|
21
24
|
is_wic_eligible: false
|
|
22
25
|
|
|
23
|
-
- name: Case 3, eligible
|
|
26
|
+
- name: Case 3, child not eligible without income or categorical eligibility.
|
|
24
27
|
period: 2022
|
|
25
28
|
input:
|
|
26
|
-
|
|
29
|
+
wic_category: CHILD
|
|
30
|
+
meets_wic_income_test: false
|
|
27
31
|
meets_wic_categorical_eligibility: false
|
|
28
32
|
is_wic_at_nutritional_risk: true
|
|
29
33
|
output:
|
|
30
|
-
is_wic_eligible:
|
|
34
|
+
is_wic_eligible: false
|
|
31
35
|
|
|
32
|
-
- name: Case 4,
|
|
33
|
-
period:
|
|
36
|
+
- name: Case 4, family with adult, infant, and child age 6.
|
|
37
|
+
period: 2024-01
|
|
34
38
|
input:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
people:
|
|
40
|
+
person1:
|
|
41
|
+
age: 30
|
|
42
|
+
person2:
|
|
43
|
+
age: 0
|
|
44
|
+
person3:
|
|
45
|
+
age: 6
|
|
46
|
+
spm_units:
|
|
47
|
+
spm_unit:
|
|
48
|
+
members: [person1, person2, person3]
|
|
49
|
+
school_meal_countable_income: 30_000
|
|
38
50
|
output:
|
|
39
|
-
|
|
51
|
+
# Adult: not eligible, infant: eligible, age 6: not eligible
|
|
52
|
+
is_wic_eligible: [false, true, false]
|
|
@@ -11,3 +11,24 @@
|
|
|
11
11
|
state_code: AK
|
|
12
12
|
output:
|
|
13
13
|
state_group: AK
|
|
14
|
+
|
|
15
|
+
- name: Contiguous state does not cause empty array indexing error
|
|
16
|
+
period: 2024
|
|
17
|
+
input:
|
|
18
|
+
state_code: TX
|
|
19
|
+
output:
|
|
20
|
+
state_group: CONTIGUOUS_US
|
|
21
|
+
|
|
22
|
+
- name: Hawaii
|
|
23
|
+
period: 2024
|
|
24
|
+
input:
|
|
25
|
+
state_code: HI
|
|
26
|
+
output:
|
|
27
|
+
state_group: HI
|
|
28
|
+
|
|
29
|
+
- name: Puerto Rico
|
|
30
|
+
period: 2024
|
|
31
|
+
input:
|
|
32
|
+
state_code: PR
|
|
33
|
+
output:
|
|
34
|
+
state_group: PR
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
- name: Person below threshold in 2026
|
|
2
|
+
period: 2026
|
|
3
|
+
reforms: policyengine_us.reforms.local.ny.mamdani_income_tax.nyc_mamdani_income_tax
|
|
4
|
+
input:
|
|
5
|
+
gov.local.ny.mamdani_income_tax.in_effect: True
|
|
6
|
+
nyc_taxable_income: 800_000
|
|
7
|
+
in_nyc: true
|
|
8
|
+
output:
|
|
9
|
+
nyc_mamdani_income_tax: 0
|
|
10
|
+
|
|
11
|
+
- name: Person at threshold in 2026
|
|
12
|
+
period: 2026
|
|
13
|
+
reforms: policyengine_us.reforms.local.ny.mamdani_income_tax.nyc_mamdani_income_tax
|
|
14
|
+
input:
|
|
15
|
+
gov.local.ny.mamdani_income_tax.in_effect: True
|
|
16
|
+
nyc_taxable_income: 1_000_000
|
|
17
|
+
in_nyc: true
|
|
18
|
+
output:
|
|
19
|
+
nyc_mamdani_income_tax: 0
|
|
20
|
+
|
|
21
|
+
- name: Person above threshold in 2026
|
|
22
|
+
period: 2026
|
|
23
|
+
reforms: policyengine_us.reforms.local.ny.mamdani_income_tax.nyc_mamdani_income_tax
|
|
24
|
+
input:
|
|
25
|
+
gov.local.ny.mamdani_income_tax.in_effect: True
|
|
26
|
+
nyc_taxable_income: 1_200_000
|
|
27
|
+
in_nyc: true
|
|
28
|
+
output:
|
|
29
|
+
# (1_200_000 - 1_000_000) * 0.02 = 200_000 * 0.02 = 4_000
|
|
30
|
+
nyc_mamdani_income_tax: 4_000
|
|
31
|
+
|
|
32
|
+
- name: Person well above threshold in 2026
|
|
33
|
+
period: 2026
|
|
34
|
+
reforms: policyengine_us.reforms.local.ny.mamdani_income_tax.nyc_mamdani_income_tax
|
|
35
|
+
input:
|
|
36
|
+
gov.local.ny.mamdani_income_tax.in_effect: True
|
|
37
|
+
nyc_taxable_income: 2_000_000
|
|
38
|
+
in_nyc: true
|
|
39
|
+
output:
|
|
40
|
+
# (2_000_000 - 1_000_000) * 0.02 = 1_000_000 * 0.02 = 20_000
|
|
41
|
+
nyc_mamdani_income_tax: 20_000
|
|
42
|
+
|
|
43
|
+
- name: Person not in NYC (no tax)
|
|
44
|
+
period: 2026
|
|
45
|
+
reforms: policyengine_us.reforms.local.ny.mamdani_income_tax.nyc_mamdani_income_tax
|
|
46
|
+
input:
|
|
47
|
+
gov.local.ny.mamdani_income_tax.in_effect: True
|
|
48
|
+
nyc_taxable_income: 1_500_000
|
|
49
|
+
in_nyc: false
|
|
50
|
+
output:
|
|
51
|
+
nyc_mamdani_income_tax: 0
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
- name: Single parent with child under max age - full EITC refundable
|
|
2
|
+
period: 2024
|
|
3
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
4
|
+
input:
|
|
5
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
6
|
+
people:
|
|
7
|
+
parent:
|
|
8
|
+
age: 30
|
|
9
|
+
child:
|
|
10
|
+
age: 2
|
|
11
|
+
is_tax_unit_dependent: true
|
|
12
|
+
tax_units:
|
|
13
|
+
tax_unit:
|
|
14
|
+
members: [parent, child]
|
|
15
|
+
eitc: 5_000
|
|
16
|
+
households:
|
|
17
|
+
household:
|
|
18
|
+
members: [parent, child]
|
|
19
|
+
state_code: UT
|
|
20
|
+
output:
|
|
21
|
+
# Utah EITC = 20% of federal EITC = 0.2 * 5_000 = 1_000
|
|
22
|
+
# Since child is age 2 (at max_age threshold), full amount is refundable
|
|
23
|
+
ut_eitc: 1_000 # Total EITC
|
|
24
|
+
ut_refundable_eitc: 1_000
|
|
25
|
+
ut_non_refundable_eitc: 0 # Non-refundable portion is reduced to zero
|
|
26
|
+
ut_has_qualifying_child_for_refundable_eitc: true
|
|
27
|
+
|
|
28
|
+
- name: Single parent with child at age 1
|
|
29
|
+
period: 2024
|
|
30
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
31
|
+
input:
|
|
32
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
33
|
+
people:
|
|
34
|
+
parent:
|
|
35
|
+
age: 30
|
|
36
|
+
child:
|
|
37
|
+
age: 1
|
|
38
|
+
is_tax_unit_dependent: true
|
|
39
|
+
tax_units:
|
|
40
|
+
tax_unit:
|
|
41
|
+
members: [parent, child]
|
|
42
|
+
eitc: 3_000
|
|
43
|
+
households:
|
|
44
|
+
household:
|
|
45
|
+
members: [parent, child]
|
|
46
|
+
state_code: UT
|
|
47
|
+
output:
|
|
48
|
+
# Utah EITC = 20% of federal EITC = 0.2 * 3_000 = 600
|
|
49
|
+
ut_eitc: 600
|
|
50
|
+
ut_refundable_eitc: 600
|
|
51
|
+
ut_non_refundable_eitc: 0
|
|
52
|
+
ut_has_qualifying_child_for_refundable_eitc: true
|
|
53
|
+
|
|
54
|
+
- name: Single parent with child age 3 - not eligible for refundable EITC
|
|
55
|
+
period: 2024
|
|
56
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
57
|
+
input:
|
|
58
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
59
|
+
people:
|
|
60
|
+
parent:
|
|
61
|
+
age: 30
|
|
62
|
+
child:
|
|
63
|
+
age: 3
|
|
64
|
+
is_tax_unit_dependent: true
|
|
65
|
+
tax_units:
|
|
66
|
+
tax_unit:
|
|
67
|
+
members: [parent, child]
|
|
68
|
+
eitc: 4_000
|
|
69
|
+
households:
|
|
70
|
+
household:
|
|
71
|
+
members: [parent, child]
|
|
72
|
+
state_code: UT
|
|
73
|
+
output:
|
|
74
|
+
# Child is too old (max_age is 2)
|
|
75
|
+
# Utah EITC = 0.2 * 4_000 = 800
|
|
76
|
+
ut_eitc: 800
|
|
77
|
+
ut_refundable_eitc: 0
|
|
78
|
+
ut_non_refundable_eitc: 800 # Remains fully non-refundable
|
|
79
|
+
ut_has_qualifying_child_for_refundable_eitc: false
|
|
80
|
+
|
|
81
|
+
- name: Single parent with multiple children, one qualifying
|
|
82
|
+
period: 2024
|
|
83
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
84
|
+
input:
|
|
85
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
86
|
+
people:
|
|
87
|
+
parent:
|
|
88
|
+
age: 35
|
|
89
|
+
child1:
|
|
90
|
+
age: 1
|
|
91
|
+
is_tax_unit_dependent: true
|
|
92
|
+
child2:
|
|
93
|
+
age: 5
|
|
94
|
+
is_tax_unit_dependent: true
|
|
95
|
+
tax_units:
|
|
96
|
+
tax_unit:
|
|
97
|
+
members: [parent, child1, child2]
|
|
98
|
+
eitc: 6_000
|
|
99
|
+
households:
|
|
100
|
+
household:
|
|
101
|
+
members: [parent, child1, child2]
|
|
102
|
+
state_code: UT
|
|
103
|
+
output:
|
|
104
|
+
# Has at least one qualifying child, so full EITC is refundable
|
|
105
|
+
# Utah EITC = 0.2 * 6_000 = 1_200
|
|
106
|
+
ut_eitc: 1_200
|
|
107
|
+
ut_refundable_eitc: 1_200
|
|
108
|
+
ut_non_refundable_eitc: 0
|
|
109
|
+
ut_has_qualifying_child_for_refundable_eitc: true
|
|
110
|
+
|
|
111
|
+
- name: Childless tax unit - not eligible
|
|
112
|
+
period: 2024
|
|
113
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
114
|
+
input:
|
|
115
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
116
|
+
people:
|
|
117
|
+
person:
|
|
118
|
+
age: 30
|
|
119
|
+
tax_units:
|
|
120
|
+
tax_unit:
|
|
121
|
+
members: [person]
|
|
122
|
+
eitc: 500
|
|
123
|
+
households:
|
|
124
|
+
household:
|
|
125
|
+
members: [person]
|
|
126
|
+
state_code: UT
|
|
127
|
+
output:
|
|
128
|
+
# Utah EITC = 0.2 * 500 = 100 (all non-refundable)
|
|
129
|
+
ut_eitc: 100
|
|
130
|
+
ut_refundable_eitc: 0
|
|
131
|
+
ut_non_refundable_eitc: 100
|
|
132
|
+
ut_has_qualifying_child_for_refundable_eitc: false
|
|
133
|
+
|
|
134
|
+
- name: Married couple with infant (age 0)
|
|
135
|
+
period: 2024
|
|
136
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
137
|
+
input:
|
|
138
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
139
|
+
people:
|
|
140
|
+
parent1:
|
|
141
|
+
age: 28
|
|
142
|
+
parent2:
|
|
143
|
+
age: 30
|
|
144
|
+
child:
|
|
145
|
+
age: 0
|
|
146
|
+
is_tax_unit_dependent: true
|
|
147
|
+
tax_units:
|
|
148
|
+
tax_unit:
|
|
149
|
+
members: [parent1, parent2, child]
|
|
150
|
+
eitc: 7_000
|
|
151
|
+
households:
|
|
152
|
+
household:
|
|
153
|
+
members: [parent1, parent2, child]
|
|
154
|
+
state_code: UT
|
|
155
|
+
output:
|
|
156
|
+
# Utah EITC = 0.2 * 7_000 = 1_400
|
|
157
|
+
ut_eitc: 1_400
|
|
158
|
+
ut_refundable_eitc: 1_400
|
|
159
|
+
ut_non_refundable_eitc: 0
|
|
160
|
+
ut_has_qualifying_child_for_refundable_eitc: true
|
|
161
|
+
|
|
162
|
+
- name: Tax unit with qualifying child but no federal EITC
|
|
163
|
+
period: 2024
|
|
164
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
165
|
+
input:
|
|
166
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
167
|
+
people:
|
|
168
|
+
parent:
|
|
169
|
+
age: 30
|
|
170
|
+
child:
|
|
171
|
+
age: 2
|
|
172
|
+
is_tax_unit_dependent: true
|
|
173
|
+
tax_units:
|
|
174
|
+
tax_unit:
|
|
175
|
+
members: [parent, child]
|
|
176
|
+
eitc: 0
|
|
177
|
+
households:
|
|
178
|
+
household:
|
|
179
|
+
members: [parent, child]
|
|
180
|
+
state_code: UT
|
|
181
|
+
output:
|
|
182
|
+
# No federal EITC means no Utah EITC
|
|
183
|
+
ut_eitc: 0
|
|
184
|
+
ut_refundable_eitc: 0
|
|
185
|
+
ut_non_refundable_eitc: 0
|
|
186
|
+
ut_has_qualifying_child_for_refundable_eitc: true
|
|
187
|
+
|
|
188
|
+
- name: Custom max_age parameter - child at age 4 qualifies
|
|
189
|
+
period: 2024
|
|
190
|
+
reforms: policyengine_us.reforms.states.ut.ut_refundable_eitc.ut_refundable_eitc
|
|
191
|
+
input:
|
|
192
|
+
gov.contrib.states.ut.eitc.in_effect: true
|
|
193
|
+
gov.contrib.states.ut.eitc.max_age: 4
|
|
194
|
+
people:
|
|
195
|
+
parent:
|
|
196
|
+
age: 30
|
|
197
|
+
child:
|
|
198
|
+
age: 4
|
|
199
|
+
is_tax_unit_dependent: true
|
|
200
|
+
tax_units:
|
|
201
|
+
tax_unit:
|
|
202
|
+
members: [parent, child]
|
|
203
|
+
eitc: 5_000
|
|
204
|
+
households:
|
|
205
|
+
household:
|
|
206
|
+
members: [parent, child]
|
|
207
|
+
state_code: UT
|
|
208
|
+
output:
|
|
209
|
+
# With max_age = 4, child age 4 qualifies
|
|
210
|
+
# Utah EITC = 0.2 * 5_000 = 1_000
|
|
211
|
+
ut_eitc: 1_000
|
|
212
|
+
ut_refundable_eitc: 1_000
|
|
213
|
+
ut_non_refundable_eitc: 0
|
|
214
|
+
ut_has_qualifying_child_for_refundable_eitc: true
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class is_federal_work_study_participant(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Participating in Federal Work Study"
|
|
9
|
+
reference = "https://www.law.cornell.edu/cfr/text/34/part-675"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class medicare_cost(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare cost"
|
|
8
|
+
documentation = (
|
|
9
|
+
"Annual value of Medicare benefits received. Calculated as total "
|
|
10
|
+
"Medicare spending on behalf of the beneficiary minus premiums paid. "
|
|
11
|
+
"This represents the net benefit value of Medicare coverage."
|
|
12
|
+
)
|
|
13
|
+
unit = USD
|
|
14
|
+
definition_period = YEAR
|
|
15
|
+
reference = "https://www.cms.gov/medicare"
|
|
16
|
+
defined_for = "medicare_enrolled"
|
|
17
|
+
|
|
18
|
+
def formula(person, period, parameters):
|
|
19
|
+
# Total Medicare spending on behalf of beneficiary
|
|
20
|
+
per_capita_spending = parameters(
|
|
21
|
+
period
|
|
22
|
+
).calibration.gov.hhs.medicare.per_capita_cost
|
|
23
|
+
|
|
24
|
+
# Premiums paid by beneficiary
|
|
25
|
+
part_a_premium = person("base_part_a_premium", period)
|
|
26
|
+
part_b_premium = person("income_adjusted_part_b_premium", period)
|
|
27
|
+
total_premiums = part_a_premium + part_b_premium
|
|
28
|
+
|
|
29
|
+
# Net benefit = spending - premiums
|
|
30
|
+
return max_(per_capita_spending - total_premiums, 0)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class medicare_enrolled(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare enrolled"
|
|
8
|
+
documentation = (
|
|
9
|
+
"Whether the person is enrolled in Medicare (Part A and/or Part B)"
|
|
10
|
+
)
|
|
11
|
+
definition_period = YEAR
|
|
12
|
+
reference = "https://www.cms.gov/medicare"
|
|
13
|
+
defined_for = "is_medicare_eligible"
|
|
14
|
+
default_value = True # Most Medicare-eligible people are enrolled
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class base_part_a_premium(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare Part A Base Premium"
|
|
8
|
+
unit = USD
|
|
9
|
+
documentation = (
|
|
10
|
+
"Annual Medicare Part A premium. Most people (99%) qualify for "
|
|
11
|
+
"premium-free Part A with 40+ quarters of Medicare-covered employment. "
|
|
12
|
+
"Those with 30-39 quarters pay a reduced premium, and those with "
|
|
13
|
+
"fewer than 30 quarters pay the full premium."
|
|
14
|
+
)
|
|
15
|
+
definition_period = YEAR
|
|
16
|
+
reference = "https://www.cms.gov/newsroom/fact-sheets/2025-medicare-parts-b-premiums-and-deductibles"
|
|
17
|
+
defined_for = "is_medicare_eligible"
|
|
18
|
+
|
|
19
|
+
def formula(person, period, parameters):
|
|
20
|
+
p = parameters(period).gov.hhs.medicare.part_a
|
|
21
|
+
quarters_covered = person("medicare_quarters_of_coverage", period)
|
|
22
|
+
|
|
23
|
+
premium_free_part_a = person("is_premium_free_part_a", period)
|
|
24
|
+
quarters_above_reduced_premium_threshold = (
|
|
25
|
+
quarters_covered >= p.reduced_premium_quarters_threshold
|
|
26
|
+
)
|
|
27
|
+
premium_amount = where(
|
|
28
|
+
quarters_above_reduced_premium_threshold,
|
|
29
|
+
p.reduced_premium,
|
|
30
|
+
p.full_premium,
|
|
31
|
+
)
|
|
32
|
+
return where(premium_free_part_a, 0, premium_amount) * MONTHS_IN_YEAR
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class is_premium_free_part_a(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Qualifies for premium-free Part A"
|
|
8
|
+
documentation = (
|
|
9
|
+
"Whether the person qualifies for premium-free Medicare Part A "
|
|
10
|
+
"based on having 40 or more quarters of Medicare-covered employment. "
|
|
11
|
+
"Approximately 99% of Medicare beneficiaries qualify for premium-free Part A."
|
|
12
|
+
)
|
|
13
|
+
definition_period = YEAR
|
|
14
|
+
reference = (
|
|
15
|
+
"https://www.medicare.gov/basics/costs/medicare-costs/part-a-costs"
|
|
16
|
+
)
|
|
17
|
+
defined_for = "is_medicare_eligible"
|
|
18
|
+
|
|
19
|
+
def formula(person, period, parameters):
|
|
20
|
+
p = parameters(period).gov.hhs.medicare.part_a
|
|
21
|
+
quarters = person("medicare_quarters_of_coverage", period)
|
|
22
|
+
return quarters >= p.premium_free_quarters_threshold
|
policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/medicare_quarters_of_coverage.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class medicare_quarters_of_coverage(Variable):
|
|
5
|
+
value_type = int
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare quarters of coverage"
|
|
8
|
+
documentation = (
|
|
9
|
+
"Number of quarters of Medicare-covered employment. Most people have "
|
|
10
|
+
"40+ quarters and qualify for premium-free Part A. Those with 30-39 "
|
|
11
|
+
"quarters pay a reduced premium, and those with fewer than 30 quarters "
|
|
12
|
+
"pay the full premium."
|
|
13
|
+
)
|
|
14
|
+
definition_period = YEAR
|
|
15
|
+
|
|
16
|
+
adds = "gov.hhs.medicare.part_a.default_quarters_of_coverage"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class base_part_b_premium(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare Part B Base Premium"
|
|
8
|
+
unit = USD
|
|
9
|
+
documentation = "Medicare Part B Premium."
|
|
10
|
+
definition_period = YEAR
|
|
11
|
+
defined_for = "is_medicare_eligible"
|
|
12
|
+
|
|
13
|
+
def formula(person, period, parameters):
|
|
14
|
+
p = parameters(period).gov.hhs.medicare.part_b
|
|
15
|
+
# base_premium is a monthly amount, multiply by MONTHS_IN_YEAR for annual
|
|
16
|
+
return p.base_premium * MONTHS_IN_YEAR
|
policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/income_adjusted_part_b_premium.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class income_adjusted_part_b_premium(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare Part B premium (income-adjusted)"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = YEAR
|
|
10
|
+
defined_for = "is_medicare_eligible"
|
|
11
|
+
reference = "https://www.medicare.gov/your-medicare-costs/part-b-costs"
|
|
12
|
+
documentation = "Medicare Part B premium adjusted for income (IRMAA). Based on modified adjusted gross income from 2 years prior."
|
|
13
|
+
|
|
14
|
+
def formula(person, period, parameters):
|
|
15
|
+
|
|
16
|
+
tax_unit = person.tax_unit
|
|
17
|
+
filing_status = tax_unit("filing_status", period)
|
|
18
|
+
# Medicare Part B IRMAA is based on MAGI from 2 years prior
|
|
19
|
+
# MAGI = AGI + tax-exempt interest
|
|
20
|
+
prior_period = period.offset(-2, "year")
|
|
21
|
+
agi = tax_unit("adjusted_gross_income", prior_period)
|
|
22
|
+
tax_exempt_interest = tax_unit(
|
|
23
|
+
"tax_exempt_interest_income", prior_period
|
|
24
|
+
)
|
|
25
|
+
magi = agi + tax_exempt_interest
|
|
26
|
+
base = person("base_part_b_premium", period)
|
|
27
|
+
|
|
28
|
+
# Build boolean masks for each status
|
|
29
|
+
status = filing_status.possible_values
|
|
30
|
+
statuses = [
|
|
31
|
+
status.SINGLE,
|
|
32
|
+
status.JOINT,
|
|
33
|
+
status.HEAD_OF_HOUSEHOLD,
|
|
34
|
+
status.SURVIVING_SPOUSE,
|
|
35
|
+
status.SEPARATE,
|
|
36
|
+
]
|
|
37
|
+
in_status = [filing_status == s for s in statuses]
|
|
38
|
+
|
|
39
|
+
p = parameters(period).gov.hhs.medicare.part_b.irmaa
|
|
40
|
+
|
|
41
|
+
irmaa_amount = select(
|
|
42
|
+
in_status,
|
|
43
|
+
[
|
|
44
|
+
p.single.calc(magi),
|
|
45
|
+
p.joint.calc(magi),
|
|
46
|
+
p.head_of_household.calc(magi),
|
|
47
|
+
p.surviving_spouse.calc(magi),
|
|
48
|
+
p.separate.calc(magi),
|
|
49
|
+
],
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# IRMAA amounts are monthly, multiply by MONTHS_IN_YEAR to get annual
|
|
53
|
+
# Base is already annual
|
|
54
|
+
annual_irmaa = irmaa_amount * MONTHS_IN_YEAR
|
|
55
|
+
return base + annual_irmaa
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class amt_exemption(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Alternative Minimum Tax exemption"
|
|
9
|
+
unit = USD
|
|
10
|
+
documentation = (
|
|
11
|
+
"AMT exemption amount after phase-out and kiddie tax adjustments. "
|
|
12
|
+
"Form 6251, Line 5."
|
|
13
|
+
)
|
|
14
|
+
reference = [
|
|
15
|
+
"https://www.law.cornell.edu/uscode/text/26/55#d", # 26 U.S.C. § 55(d)
|
|
16
|
+
"https://www.irs.gov/instructions/i6251",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
def formula(tax_unit, period, parameters):
|
|
20
|
+
p = parameters(period).gov.irs.income.amt
|
|
21
|
+
phase_out = p.exemption.phase_out
|
|
22
|
+
filing_status = tax_unit("filing_status", period)
|
|
23
|
+
amt_income = tax_unit("amt_income", period)
|
|
24
|
+
|
|
25
|
+
# Base exemption amount based on filing status
|
|
26
|
+
base_exemption_amount = p.exemption.amount[filing_status]
|
|
27
|
+
|
|
28
|
+
# Phase-out at higher income levels
|
|
29
|
+
income_excess = max_(0, amt_income - phase_out.start[filing_status])
|
|
30
|
+
exemption_phase_out = phase_out.rate * income_excess
|
|
31
|
+
reduced_exemption_amount = max_(
|
|
32
|
+
0,
|
|
33
|
+
base_exemption_amount - exemption_phase_out,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# A reduced exemption amount is applied to kiddie tax filers
|
|
37
|
+
kiddie_tax_applies = tax_unit("amt_kiddie_tax_applies", period)
|
|
38
|
+
adj_earnings = tax_unit("filer_adjusted_earnings", period)
|
|
39
|
+
child_amount = p.exemption.child.amount
|
|
40
|
+
|
|
41
|
+
exemption_cap = where(
|
|
42
|
+
kiddie_tax_applies,
|
|
43
|
+
adj_earnings + child_amount,
|
|
44
|
+
np.inf,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return min_(reduced_exemption_amount, exemption_cap)
|
|
@@ -17,28 +17,10 @@ class amt_income_less_exemptions(Variable):
|
|
|
17
17
|
taxable_income = tax_unit("taxable_income", period)
|
|
18
18
|
kiddie_tax_applies = tax_unit("amt_kiddie_tax_applies", period)
|
|
19
19
|
applied_income = where(kiddie_tax_applies, taxable_income, amt_income)
|
|
20
|
+
|
|
20
21
|
# Form 6251, Part II top
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
filing_status = tax_unit("filing_status", period)
|
|
24
|
-
# Line 5 the exemption amount is based on filing status and
|
|
25
|
-
# is phased-out at higher income
|
|
26
|
-
base_exemption_amount = p.exemption.amount[filing_status]
|
|
27
|
-
income_excess = max_(0, amt_income - phase_out.start[filing_status])
|
|
28
|
-
exemption_phase_out = phase_out.rate * income_excess
|
|
29
|
-
reduced_exemption_amount = max_(
|
|
30
|
-
0,
|
|
31
|
-
(base_exemption_amount - exemption_phase_out),
|
|
32
|
-
)
|
|
33
|
-
# A reduced exemption amount is applied to kiddie tax filers
|
|
34
|
-
adj_earnings = tax_unit("filer_adjusted_earnings", period)
|
|
35
|
-
child_amount = p.exemption.child.amount
|
|
22
|
+
# Line 5
|
|
23
|
+
amt_exemption = tax_unit("amt_exemption", period)
|
|
36
24
|
|
|
37
|
-
exemption_cap = where(
|
|
38
|
-
kiddie_tax_applies,
|
|
39
|
-
adj_earnings + child_amount,
|
|
40
|
-
np.inf,
|
|
41
|
-
)
|
|
42
|
-
capped_exemption_amount = min_(reduced_exemption_amount, exemption_cap)
|
|
43
25
|
# Line 6
|
|
44
|
-
return max_(0, applied_income -
|
|
26
|
+
return max_(0, applied_income - amt_exemption)
|
|
@@ -29,10 +29,12 @@ class ca_amt_exemption(Variable):
|
|
|
29
29
|
reduced_amti_rate = reduced_amti * p_irs.phase_out.rate
|
|
30
30
|
# Line 6
|
|
31
31
|
adult_exemption = max_(exemption_max_amount - reduced_amti_rate, 0)
|
|
32
|
-
# Eligible children receive an increased exemption amount
|
|
32
|
+
# Eligible children receive an increased exemption amount.
|
|
33
|
+
# This applies when the HEAD of the tax unit is a child dependent.
|
|
33
34
|
person = tax_unit.members
|
|
34
35
|
eligible_child = person("is_child_dependent", period)
|
|
35
|
-
|
|
36
|
+
is_head = person("is_tax_unit_head", period)
|
|
37
|
+
head_is_eligible_child = tax_unit.any(eligible_child & is_head)
|
|
36
38
|
# Line 7
|
|
37
39
|
exemption_amount_child = p_irs.child.amount
|
|
38
40
|
# Line 8
|