policyengine-us 1.458.0__py3-none-any.whl → 1.471.0__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/gov/contrib/aca/ptc_700_fpl_cliff/brackets.yaml +52 -0
- policyengine_us/parameters/gov/contrib/aca/ptc_700_fpl_cliff/in_effect.yaml +9 -0
- policyengine_us/parameters/gov/contrib/aca/ptc_700_fpl_cliff/income_eligibility.yaml +27 -0
- policyengine_us/parameters/gov/hhs/medicaid/emergency_medicaid/enabled.yaml +14 -0
- policyengine_us/parameters/gov/hhs/medicaid/emergency_medicaid/uses_medicaid_income_thresholds.yaml +13 -0
- policyengine_us/parameters/gov/hhs/medicare/savings_programs/eligibility/asset/applies.yaml +115 -0
- policyengine_us/parameters/gov/hhs/medicare/savings_programs/eligibility/asset/couple.yaml +14 -0
- policyengine_us/parameters/gov/hhs/medicare/savings_programs/eligibility/asset/individual.yaml +14 -0
- policyengine_us/parameters/gov/hhs/medicare/savings_programs/eligibility/income/qi/fpl_limit.yaml +14 -0
- policyengine_us/parameters/gov/hhs/medicare/savings_programs/eligibility/income/qmb/fpl_limit.yaml +18 -0
- policyengine_us/parameters/gov/hhs/medicare/savings_programs/eligibility/income/slmb/fpl_limit.yaml +15 -0
- policyengine_us/parameters/gov/ssa/revenue/oasdi_share_of_gross_ss.yaml +13 -0
- policyengine_us/parameters/gov/states/az/tax/income/credits/property_tax/income_sources.yaml +17 -9
- policyengine_us/parameters/gov/states/hi/tax/income/credits/food_excise_tax/amount/head_of_household.yaml +1 -1
- policyengine_us/parameters/gov/states/hi/tax/income/credits/food_excise_tax/amount/joint.yaml +1 -1
- policyengine_us/parameters/gov/states/hi/tax/income/credits/food_excise_tax/amount/separate.yaml +1 -1
- policyengine_us/parameters/gov/states/hi/tax/income/credits/food_excise_tax/amount/single.yaml +1 -1
- policyengine_us/parameters/gov/states/hi/tax/income/credits/food_excise_tax/amount/surviving_spouse.yaml +1 -1
- policyengine_us/parameters/gov/states/ia/tax/income/credits/child_care/fraction.yaml +1 -1
- policyengine_us/parameters/gov/states/il/dhs/aabd/asset/sources.yaml +0 -1
- policyengine_us/parameters/gov/states/il/isbe/age_threshold/teen_parent.yaml +15 -0
- policyengine_us/parameters/gov/states/il/isbe/income/countable_sources.yaml +28 -0
- policyengine_us/parameters/gov/states/il/isbe/income/income_limit_rate.yaml +13 -0
- policyengine_us/parameters/gov/states/il/isbe/pfa/benefit/amount.yaml +15 -0
- policyengine_us/parameters/gov/states/il/isbe/pfae/benefit/amount.yaml +15 -0
- policyengine_us/parameters/gov/states/il/isbe/pfae/eligibility/age_range.yaml +26 -0
- policyengine_us/parameters/gov/states/il/isbe/pfae/eligibility/income/deep_poverty_rate.yaml +10 -0
- policyengine_us/parameters/gov/states/il/isbe/pfae/eligibility/income/low_income_rate.yaml +10 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/benefit/amount.yaml +16 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/age_threshold/child.yaml +13 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/age_threshold/young_parent.yaml +11 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/income/deep_poverty_rate.yaml +11 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/income/low_income_rate.yaml +11 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/income/poverty_rate.yaml +11 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/priority/geriatric_pregnancy_age.yaml +10 -0
- policyengine_us/parameters/gov/states/il/isbe/pi/eligibility/risk_factors/minimum_score.yaml +11 -0
- policyengine_us/parameters/gov/states/in/fssa/README.md +1 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/README.md +1 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/eligibility/continuing/fpg_rate.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/income/deductions/benefit/earned_income_disregard/rate.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/income/deductions/eligibility/earned_income_disregard/rate.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/income/deductions/eligibility/flat_disregard/amount.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/income/deductions/work_expense/amount.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/resources/limit/at_application/amount.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/resources/limit/while_receiving/amount.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/resources/vehicle_exemption/amount.yaml +12 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/standard_of_need/amount.yaml +34 -0
- policyengine_us/parameters/gov/states/in/fssa/tanf/standard_of_need/max_unit_size.yaml +12 -0
- policyengine_us/parameters/gov/states/mi/tax/income/household_resources.yaml +1 -1
- policyengine_us/parameters/gov/states/mo/dss/tanf/child_care_deduction/amount.yaml +27 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/earned_income_disregard/amount.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/earned_income_disregard/thirty_only/amount.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/earned_income_disregard/thirty_plus_one_third/flat_amount.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/earned_income_disregard/thirty_plus_one_third/percentage.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/earned_income_disregard/two_thirds_disregard/percentage.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/income_limit/max_table_size.yaml +12 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/income_limit/rate.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/maximum_benefit/percentage.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/minimum_payment.yaml +12 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/resource_limit/amount.yaml +14 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/standard_of_need/additional_person_increment.yaml +12 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/standard_of_need/amount.yaml +38 -0
- policyengine_us/parameters/gov/states/mo/dss/tanf/standard_of_need/base_table_max_size.yaml +12 -0
- policyengine_us/parameters/gov/states/mo/tax/income/minimum_taxable_income.yaml +3 -0
- policyengine_us/parameters/gov/states/mo/tax/income/rates.yaml +13 -4
- policyengine_us/parameters/gov/states/mo/tax/income/subtractions/agi_subtractions.yaml +18 -0
- policyengine_us/parameters/gov/states/mo/tax/income/subtractions/net_capital_gain/rate.yaml +14 -0
- policyengine_us/parameters/gov/states/oh/odjfs/owf/income/deductions/earned_income_disregard/flat_amount.yaml +14 -0
- policyengine_us/parameters/gov/states/oh/odjfs/owf/income/deductions/earned_income_disregard/percentage_of_disregard.yaml +16 -0
- policyengine_us/parameters/gov/states/oh/odjfs/owf/initial_eligibility/income_limit_rate.yaml +14 -0
- policyengine_us/parameters/gov/states/oh/odjfs/owf/payment_standard/additional_person_increment.yaml +14 -0
- policyengine_us/parameters/gov/states/oh/odjfs/owf/payment_standard/amounts.yaml +43 -0
- policyengine_us/parameters/gov/states/oh/odjfs/owf/payment_standard/max_group_size.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/age_threshold/minor_child.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/adjusted_income_limit/additional_person.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/adjusted_income_limit/amount.yaml +32 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/child_support_disregard/max.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/child_support_disregard/per_child.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/countable_income_limit/additional_person.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/countable_income_limit/amount.yaml +32 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/earned_income_disregard_rate.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/income/eli_multiplier.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/maximum_need_group_size.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/minimum_benefit.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/payment_standard/additional_person.yaml +12 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/payment_standard/amount.yaml +32 -0
- policyengine_us/parameters/gov/states/or/odhs/tanf/resources/limit/amount.yaml +12 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/county_group/group_1.yaml +19 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/county_group/group_2.yaml +44 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/county_group/group_3.yaml +31 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/county_group/group_4.yaml +29 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/family_size_allowance/additional_person.yaml +14 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/family_size_allowance/amount.yaml +69 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/income/deductions/earned_income_disregard/percentage.yaml +14 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/income/deductions/work_expense/additional.yaml +15 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/income/deductions/work_expense/initial.yaml +14 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/max_family_size_in_table.yaml +12 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/resource_limit.yaml +7 -6
- policyengine_us/parameters/gov/states/pa/dhs/tanf/standard_of_need/additional_person.yaml +14 -0
- policyengine_us/parameters/gov/states/pa/dhs/tanf/standard_of_need/amount.yaml +69 -0
- policyengine_us/parameters/gov/states/wi/dcf/README.md +1 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/README.md +1 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/asset/limit.yaml +16 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/asset/vehicle_exclusion.yaml +14 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/income_limit/rate.yaml +16 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/placement/amount.yaml +30 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/placement/arp_pregnancy_month_threshold.yaml +14 -0
- policyengine_us/parameters/gov/states/wi/dcf/works/placement/cmc_infant_age_limit.yaml +15 -0
- policyengine_us/reforms/aca/__init__.py +3 -0
- policyengine_us/reforms/aca/aca_ptc_700_fpl_cliff.py +125 -0
- policyengine_us/reforms/reforms.py +5 -0
- policyengine_us/tests/microsimulation/test_microsim.py +46 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/integration.yaml +667 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/is_emergency_medicaid_eligible.yaml +376 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/category/msp_category.yaml +69 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/eligibility/msp_eligible.yaml +62 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/income/msp_fpg.yaml +22 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/integration.yaml +84 -0
- policyengine_us/tests/policy/baseline/gov/hhs/medicare/savings_programs/msp_benefit_value.yaml +62 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/social_security/taxable_social_security_tier_1.yaml +157 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/social_security/taxable_social_security_tier_2.yaml +106 -0
- policyengine_us/tests/policy/baseline/gov/ssa/revenue/employer_medicare_tax_income_tax_revenue.yaml +86 -0
- policyengine_us/tests/policy/baseline/gov/ssa/revenue/employer_ss_tax_income_tax_revenue.yaml +85 -0
- policyengine_us/tests/policy/baseline/gov/ssa/revenue/tob_revenue_medicare_hi.yaml +124 -0
- policyengine_us/tests/policy/baseline/gov/ssa/revenue/tob_revenue_oasdi.yaml +129 -0
- policyengine_us/tests/policy/baseline/gov/ssa/revenue/tob_revenue_total.yaml +19 -0
- policyengine_us/tests/policy/baseline/gov/ssa/revenue/tob_tier_split.yaml +72 -0
- policyengine_us/tests/policy/baseline/gov/states/az/tax/income/az_property_tax_credit_agi.yaml +58 -0
- policyengine_us/tests/policy/baseline/gov/states/az/tax/income/integration.yaml +28 -0
- policyengine_us/tests/policy/baseline/gov/states/dc/tax/income/dc_ptc.yaml +27 -0
- policyengine_us/tests/policy/baseline/gov/states/hi/tax/income/credits/food_excise/hi_food_excise_credit.yaml +29 -1
- policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_cdcc.yaml +3 -3
- policyengine_us/tests/policy/baseline/gov/states/ia/tax/income/ia_integration.yaml +31 -1
- policyengine_us/tests/policy/baseline/gov/states/il/dhs/aabd/eligibility/il_aabd_non_financial_eligible_person.yaml +6 -6
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/fpp/integration.yaml +2 -2
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_disability_eligible.yaml +18 -5
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/eligibility/il_hbwd_eligible.yaml +5 -5
- policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbwd/integration.yaml +8 -8
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/eligibility/il_isbe_income_eligible.yaml +15 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/eligibility/il_isbe_was_teen_parent_at_first_birth.yaml +310 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/eligibility/il_pfae_age_eligible_child.yaml +39 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/eligibility/il_pfae_basic_eligible.yaml +26 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/eligibility/il_pfae_eligible.yaml +49 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/integration.yaml +102 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/priority/il_pfae_has_highest_priority_factor.yaml +31 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/priority/il_pfae_is_deep_poverty.yaml +15 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/priority/il_pfae_is_low_income.yaml +15 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pfae/priority/il_pfae_secondary_priority_factor_count.yaml +85 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/il_pi_basic_eligible.yaml +46 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/il_pi_demographic_eligible.yaml +48 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/il_pi_eligible.yaml +38 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/il_pi_risk_eligible.yaml +74 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/income/il_pi_is_deep_poverty.yaml +43 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/income/il_pi_is_low_income.yaml +43 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/income/il_pi_is_poverty.yaml +43 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/priority/il_pi_has_developmental_delay.yaml +75 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/priority/il_pi_has_geriatric_pregnancy.yaml +74 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/priority/il_pi_highest_priority_score.yaml +100 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/priority/il_pi_is_young_parent_family.yaml +91 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/priority/il_pi_lower_priority_score.yaml +102 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/eligibility/priority/il_pi_other_priority_score.yaml +160 -0
- policyengine_us/tests/policy/baseline/gov/states/il/isbe/pi/integration.yaml +187 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/benefit/in_tanf_payment_standard.yaml +58 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/eligibility/in_tanf_countable_income_eligible.yaml +163 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/eligibility/in_tanf_eligible.yaml +94 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/eligibility/in_tanf_income_eligible.yaml +74 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/eligibility/in_tanf_payment_eligible.yaml +63 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/in_tanf.yaml +64 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/income/in_tanf_countable_earned_income.yaml +83 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/income/in_tanf_countable_earned_income_for_eligibility.yaml +112 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/income/in_tanf_countable_income_for_payment.yaml +71 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/integration.yaml +249 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/resources/in_tanf_countable_resources.yaml +38 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/resources/in_tanf_resources_eligible.yaml +60 -0
- policyengine_us/tests/policy/baseline/gov/states/in/fssa/tanf/resources/integration_with_eligibility.yaml +78 -0
- policyengine_us/tests/policy/baseline/gov/states/ma/tax/income/gross_income/integration.yaml +28 -0
- policyengine_us/tests/policy/baseline/gov/states/me/tax/income/credits/integration.yaml +87 -0
- policyengine_us/tests/policy/baseline/gov/states/me/tax/income/credits/me_dependent_exemption_credit_amount_person.yaml +3 -2
- policyengine_us/tests/policy/baseline/gov/states/mi/tax/income/credits/home_heating/mi_home_heating_credit.yaml +87 -0
- policyengine_us/tests/policy/baseline/gov/states/mi/tax/income/mi_household_resources.yaml +57 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/integration.yaml +275 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf.yaml +60 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_child_care_deduction.yaml +187 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_countable_income.yaml +49 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_earned_income_deductions.yaml +53 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_eligible.yaml +59 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_gross_income_eligible.yaml +29 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_income_eligible.yaml +49 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_maximum_benefit.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_percentage_of_need_test.yaml +53 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_resources_eligible.yaml +23 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_standard_of_need.yaml +71 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_standard_of_need_test.yaml +44 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/subtractions/mo_agi_subtractions.yaml +176 -0
- policyengine_us/tests/policy/baseline/gov/states/mo/tax/income/subtractions/mo_capital_gains_subtraction.yaml +65 -0
- policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/integration.yaml +29 -0
- 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/odjfs/owf/integration.yaml +152 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/odjfs/owf/oh_owf_countable_income.yaml +113 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/odjfs/owf/oh_owf_eligible.yaml +239 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/odjfs/owf/oh_owf_fpg.yaml +73 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/odjfs/owf/oh_owf_income_eligible.yaml +80 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/odjfs/owf/oh_owf_initial_income_eligible.yaml +160 -0
- policyengine_us/tests/policy/baseline/gov/states/oh/odjfs/owf/oh_owf_payment_standard.yaml +77 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/integration.yaml +363 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf.yaml +94 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_adjusted_income.yaml +77 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_adjusted_income_eligible.yaml +73 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_child_support_disregard.yaml +272 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_countable_income.yaml +70 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_countable_income_eligible.yaml +73 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_eli_eligible.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_eli_income_eligible.yaml +75 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_eligible.yaml +68 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_income_eligible.yaml +211 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_payment_standard.yaml +68 -0
- policyengine_us/tests/policy/baseline/gov/states/or/odhs/tanf/or_tanf_resources_eligible.yaml +37 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/eligibility/pa_tanf_disregard_eligible.yaml +114 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/eligibility/pa_tanf_eligible.yaml +65 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/eligibility/pa_tanf_income_eligible.yaml +62 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/eligibility/pa_tanf_resources_eligible.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/income/pa_tanf_earned_income_after_deductions_person.yaml +81 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/integration.yaml +386 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/pa_tanf.yaml +53 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/pa_tanf_county_group.yaml +63 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/pa_tanf_maximum_benefit.yaml +92 -0
- policyengine_us/tests/policy/baseline/gov/states/pa/dhs/tanf/pa_tanf_standard_of_need.yaml +73 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/integration.yaml +282 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works.yaml +50 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works_countable_income.yaml +49 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works_countable_resources.yaml +54 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works_eligible.yaml +61 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works_income_eligible.yaml +43 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works_placement.yaml +111 -0
- policyengine_us/tests/policy/baseline/gov/states/wi/dcf/works/wi_works_resources_eligible.yaml +38 -0
- policyengine_us/tests/policy/baseline/gov/states/wv/tax/income/credits/heptc/wv_homestead_excess_property_tax_credit.yaml +31 -0
- policyengine_us/tests/policy/contrib/aca/ptc_700_fpl_cliff.yaml +136 -0
- policyengine_us/tests/run_selective_tests.py +5 -0
- policyengine_us/tests/test_batched.py +144 -78
- policyengine_us/variables/gov/hhs/medicaid/emergency_medicaid/has_emergency_medical_condition.py +16 -0
- policyengine_us/variables/gov/hhs/medicaid/emergency_medicaid/is_emergency_medicaid_eligible.py +33 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/category/is_qi_eligible.py +33 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/category/is_qmb_eligible.py +28 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/category/is_slmb_eligible.py +33 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/category/msp_category.py +33 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/eligibility/msp_asset_eligible.py +26 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/eligibility/msp_eligible.py +20 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/eligibility/msp_income_eligible.py +26 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/income/msp_countable_income.py +35 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/income/msp_fpg.py +40 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/msp.py +15 -0
- policyengine_us/variables/gov/hhs/medicare/savings_programs/msp_benefit_value.py +37 -0
- policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/social_security/taxable_social_security_tier_1.py +58 -0
- policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/irs_gross_income/social_security/taxable_social_security_tier_2.py +17 -0
- policyengine_us/variables/gov/simulation/labor_supply_response/labor_supply_behavioral_response.py +57 -42
- policyengine_us/variables/gov/ssa/revenue/employer_medicare_tax_income_tax_revenue.py +58 -0
- policyengine_us/variables/gov/ssa/revenue/employer_ss_tax_income_tax_revenue.py +60 -0
- policyengine_us/variables/gov/ssa/revenue/tob_revenue_medicare_hi.py +67 -0
- policyengine_us/variables/gov/ssa/revenue/tob_revenue_oasdi.py +82 -0
- policyengine_us/variables/gov/ssa/revenue/tob_revenue_total.py +49 -0
- policyengine_us/variables/gov/states/az/tax/income/credits/property_tax_credit/az_property_tax_credit_agi.py +53 -0
- policyengine_us/variables/gov/states/dc/tax/income/credits/dc_ptc.py +7 -3
- policyengine_us/variables/gov/states/ia/tax/income/credits/ia_cdcc.py +4 -2
- policyengine_us/variables/gov/states/il/dhs/aabd/eligibility/il_aabd_non_financial_eligible_person.py +23 -5
- policyengine_us/variables/gov/states/il/hfs/fpp/eligibility/il_fpp_eligible.py +1 -1
- policyengine_us/variables/gov/states/il/hfs/hbwd/eligibility/il_hbwd_disability_eligible.py +7 -3
- policyengine_us/variables/gov/states/il/isbe/eligibility/il_isbe_income_eligible.py +26 -0
- policyengine_us/variables/gov/states/il/isbe/eligibility/il_isbe_was_teen_parent_at_first_birth.py +32 -0
- policyengine_us/variables/gov/states/il/isbe/income/il_isbe_countable_income.py +13 -0
- policyengine_us/variables/gov/states/il/isbe/pfa/il_pfa.py +15 -0
- policyengine_us/variables/gov/states/il/isbe/pfa/il_pfa_eligible.py +18 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/eligibility/il_pfae_age_eligible_child.py +23 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/eligibility/il_pfae_basic_eligible.py +19 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/eligibility/il_pfae_eligible.py +28 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/il_pfae.py +19 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/priority/il_pfae_has_highest_priority_factor.py +40 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/priority/il_pfae_is_deep_poverty.py +23 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/priority/il_pfae_is_low_income.py +21 -0
- policyengine_us/variables/gov/states/il/isbe/pfae/priority/il_pfae_secondary_priority_factor_count.py +65 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/il_pi_basic_eligible.py +17 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/il_pi_demographic_eligible.py +18 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/il_pi_risk_eligible.py +18 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/income/il_pi_is_deep_poverty.py +23 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/income/il_pi_is_low_income.py +21 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/income/il_pi_is_poverty.py +21 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_has_developmental_delay.py +16 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_has_geriatric_pregnancy.py +20 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_highest_priority_score.py +37 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_is_young_parent_family.py +21 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_lower_priority_score.py +36 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_other_priority_score.py +54 -0
- policyengine_us/variables/gov/states/il/isbe/pi/eligibility/priority/il_pi_priority_score.py +19 -0
- policyengine_us/variables/gov/states/il/isbe/pi/il_pi.py +15 -0
- policyengine_us/variables/gov/states/il/isbe/pi/il_pi_eligible.py +18 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/eligibility/in_tanf_countable_income_eligible.py +31 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/eligibility/in_tanf_eligible.py +36 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/eligibility/in_tanf_income_eligible.py +21 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/eligibility/in_tanf_payment_eligible.py +18 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/eligibility/in_tanf_resources_eligible.py +25 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/in_tanf.py +21 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/in_tanf_payment_standard.py +19 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/income/in_tanf_countable_earned_income.py +20 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/income/in_tanf_countable_earned_income_for_eligibility.py +33 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/income/in_tanf_countable_income_for_eligibility.py +19 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/income/in_tanf_countable_income_for_payment.py +13 -0
- policyengine_us/variables/gov/states/in/fssa/tanf/resources/in_tanf_countable_resources.py +27 -0
- policyengine_us/variables/gov/states/ma/tax/income/gross_income/ma_part_c_gross_income.py +7 -1
- policyengine_us/variables/gov/states/me/tax/income/credits/dependent_exemption/me_dependent_exemption_credit_amount_person.py +1 -1
- policyengine_us/variables/gov/states/mi/tax/income/mi_household_resources.py +34 -5
- policyengine_us/variables/gov/states/mo/dss/tanf/eligibility/mo_tanf_eligible.py +23 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/eligibility/mo_tanf_gross_income_eligible.py +24 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/eligibility/mo_tanf_income_eligible.py +18 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/eligibility/mo_tanf_percentage_of_need_test.py +20 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/eligibility/mo_tanf_resources_eligible.py +18 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/eligibility/mo_tanf_standard_of_need_test.py +17 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/income/deductions/mo_tanf_child_care_deduction.py +24 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/income/deductions/mo_tanf_earned_income_deductions.py +36 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/income/mo_tanf_countable_income.py +21 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/income/mo_tanf_income_for_need_test.py +23 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/mo_tanf.py +21 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/mo_tanf_maximum_benefit.py +19 -0
- policyengine_us/variables/gov/states/mo/dss/tanf/mo_tanf_standard_of_need.py +23 -0
- policyengine_us/variables/gov/states/mo/tax/income/adjusted_gross_income/mo_adjusted_gross_income.py +1 -1
- policyengine_us/variables/gov/states/mo/tax/income/subtractions/mo_agi_subtractions.py +16 -0
- policyengine_us/variables/gov/states/mo/tax/income/subtractions/mo_capital_gains_subtraction.py +20 -0
- policyengine_us/variables/gov/states/mo/tax/income/subtractions/mo_capital_gains_subtraction_person.py +28 -0
- policyengine_us/variables/gov/states/mt/tax/income/capital_gains/mt_capital_gains_tax_indiv.py +3 -1
- policyengine_us/variables/gov/states/mt/tax/income/capital_gains/mt_capital_gains_tax_joint.py +3 -1
- policyengine_us/variables/gov/states/mt/tax/income/tax_calculation/mt_regular_income_tax_indiv.py +3 -0
- policyengine_us/variables/gov/states/mt/tax/income/tax_calculation/mt_regular_income_tax_joint.py +3 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/eligibility/oh_owf_eligible.py +39 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/eligibility/oh_owf_income_eligible.py +33 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/eligibility/oh_owf_initial_income_eligible.py +30 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/income/oh_owf_countable_income.py +40 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/oh_owf.py +23 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/oh_owf_fpg.py +32 -0
- policyengine_us/variables/gov/states/oh/odjfs/owf/oh_owf_payment_standard.py +26 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/benefit/or_tanf_payment_standard.py +23 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_adjusted_income_eligible.py +28 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_countable_income_eligible.py +28 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_eli_eligible.py +16 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_eli_income_eligible.py +20 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_eligible.py +25 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_income_eligible.py +26 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/eligibility/or_tanf_resources_eligible.py +19 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/income/or_tanf_adjusted_income.py +21 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/income/or_tanf_child_support_disregard.py +25 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/income/or_tanf_countable_income.py +20 -0
- policyengine_us/variables/gov/states/or/odhs/tanf/or_tanf.py +25 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/eligibility/pa_tanf_disregard_eligible.py +31 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/eligibility/pa_tanf_eligible.py +29 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/eligibility/pa_tanf_income_eligible.py +16 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/eligibility/pa_tanf_resources_eligible.py +7 -5
- policyengine_us/variables/gov/states/pa/dhs/tanf/income/pa_tanf_countable_earned_income.py +15 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/income/pa_tanf_countable_income.py +16 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/income/pa_tanf_earned_income_after_deductions_person.py +27 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/pa_tanf.py +19 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/pa_tanf_county_group.py +38 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/pa_tanf_maximum_benefit.py +30 -0
- policyengine_us/variables/gov/states/pa/dhs/tanf/pa_tanf_standard_of_need.py +30 -0
- policyengine_us/variables/gov/states/wi/dcf/works/eligibility/wi_works_eligible.py +22 -0
- policyengine_us/variables/gov/states/wi/dcf/works/eligibility/wi_works_income_eligible.py +20 -0
- policyengine_us/variables/gov/states/wi/dcf/works/eligibility/wi_works_resources_eligible.py +18 -0
- policyengine_us/variables/gov/states/wi/dcf/works/income/wi_works_countable_income.py +18 -0
- policyengine_us/variables/gov/states/wi/dcf/works/resources/wi_works_countable_resources.py +21 -0
- policyengine_us/variables/gov/states/wi/dcf/works/wi_works.py +19 -0
- policyengine_us/variables/gov/states/wi/dcf/works/wi_works_placement.py +45 -0
- policyengine_us/variables/gov/states/wv/tax/income/credits/heptc/wv_homestead_excess_property_tax_credit.py +3 -3
- policyengine_us/variables/gov/states/wv/tax/income/credits/heptc/wv_homestead_excess_property_tax_credit_eligible.py +5 -2
- policyengine_us/variables/household/demographic/geographic/county/county.py +9 -0
- policyengine_us/variables/household/demographic/geographic/is_non_english_speaking_home.py +9 -0
- policyengine_us/variables/household/demographic/household/parent_has_less_than_high_school_education.py +9 -0
- policyengine_us/variables/household/demographic/person/has_developmental_delay.py +9 -0
- policyengine_us/variables/household/demographic/person/has_individualized_education_program.py +9 -0
- policyengine_us/variables/household/demographic/person/has_no_prior_formal_early_learning.py +9 -0
- policyengine_us/variables/household/demographic/person/is_born_outside_us.py +9 -0
- {policyengine_us-1.458.0.dist-info → policyengine_us-1.471.0.dist-info}/METADATA +1 -1
- {policyengine_us-1.458.0.dist-info → policyengine_us-1.471.0.dist-info}/RECORD +381 -69
- policyengine_us/parameters/gov/states/il/dhs/aabd/aged_age_threshold.yaml +0 -11
- policyengine_us/parameters/gov/states/mo/dss/tanf/income_limit.yaml +0 -26
- policyengine_us/parameters/gov/states/pa/dhs/tanf/cash_assistance/age_limit.yaml +0 -11
- policyengine_us/parameters/gov/states/pa/dhs/tanf/pregnancy_eligibility/age_limit.yaml +0 -9
- policyengine_us/tests/policy/baseline/gov/states/il/dhs/aabd/eligibility/il_aabd_aged_blind_disabled_person.yaml +0 -39
- policyengine_us/tests/policy/baseline/gov/states/mo/dss/tanf/mo_tanf_income_limit.yaml +0 -23
- policyengine_us/tests/policy/baseline/gov/states/pa/tanf/cash_assistance/pa_tanf_age_eligible.yaml +0 -44
- policyengine_us/tests/policy/baseline/gov/states/pa/tanf/pregnancy_eligibility/pa_tanf_pregnancy_eligibility.yaml +0 -59
- policyengine_us/tests/policy/baseline/gov/states/pa/tax/income/dhs/tanf/eligibility/pa_tanf_resources_eligible.yaml +0 -24
- policyengine_us/variables/gov/states/il/dhs/aabd/eligibility/il_aabd_aged_blind_disabled_person.py +0 -22
- policyengine_us/variables/gov/states/mo/dss/tanf/mo_tanf_income_limit.py +0 -18
- policyengine_us/variables/gov/states/pa/dhs/tanf/cash_assistance/pa_tanf_age_eligible.py +0 -22
- policyengine_us/variables/gov/states/pa/dhs/tanf/eligibility/pa_tanf_countable_resources.py +0 -10
- policyengine_us/variables/gov/states/pa/dhs/tanf/eligibility/pregnancy_eligibility/age_eligibility.py +0 -22
- {policyengine_us-1.458.0.dist-info → policyengine_us-1.471.0.dist-info}/WHEEL +0 -0
- {policyengine_us-1.458.0.dist-info → policyengine_us-1.471.0.dist-info}/entry_points.txt +0 -0
- {policyengine_us-1.458.0.dist-info → policyengine_us-1.471.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class is_qi_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Qualifying Individual (QI) eligible"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.law.cornell.edu/cfr/text/42/435.123",
|
|
11
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(person, period, parameters):
|
|
15
|
+
# QI requires income above 120% FPL but at or below 135% FPL
|
|
16
|
+
p = parameters(
|
|
17
|
+
period
|
|
18
|
+
).gov.hhs.medicare.savings_programs.eligibility.income
|
|
19
|
+
|
|
20
|
+
medicare_eligible = person("is_medicare_eligible", period.this_year)
|
|
21
|
+
asset_eligible = person("msp_asset_eligible", period)
|
|
22
|
+
|
|
23
|
+
fpg = person("msp_fpg", period)
|
|
24
|
+
countable_income = person("msp_countable_income", period)
|
|
25
|
+
|
|
26
|
+
slmb_income_limit = fpg * p.slmb.fpl_limit
|
|
27
|
+
qi_income_limit = fpg * p.qi.fpl_limit
|
|
28
|
+
|
|
29
|
+
income_above_slmb = countable_income > slmb_income_limit
|
|
30
|
+
income_at_or_below_qi = countable_income <= qi_income_limit
|
|
31
|
+
income_eligible = income_above_slmb & income_at_or_below_qi
|
|
32
|
+
|
|
33
|
+
return medicare_eligible & income_eligible & asset_eligible
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class is_qmb_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Qualified Medicare Beneficiary (QMB) eligible"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.law.cornell.edu/cfr/text/42/435.121",
|
|
11
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(person, period, parameters):
|
|
15
|
+
# QMB requires income at or below 100% FPL
|
|
16
|
+
p = parameters(
|
|
17
|
+
period
|
|
18
|
+
).gov.hhs.medicare.savings_programs.eligibility.income
|
|
19
|
+
|
|
20
|
+
medicare_eligible = person("is_medicare_eligible", period.this_year)
|
|
21
|
+
asset_eligible = person("msp_asset_eligible", period)
|
|
22
|
+
|
|
23
|
+
fpg = person("msp_fpg", period)
|
|
24
|
+
countable_income = person("msp_countable_income", period)
|
|
25
|
+
qmb_income_limit = fpg * p.qmb.fpl_limit
|
|
26
|
+
income_eligible = countable_income <= qmb_income_limit
|
|
27
|
+
|
|
28
|
+
return medicare_eligible & income_eligible & asset_eligible
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class is_slmb_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Specified Low-Income Medicare Beneficiary (SLMB) eligible"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.law.cornell.edu/cfr/text/42/435.122",
|
|
11
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(person, period, parameters):
|
|
15
|
+
# SLMB requires income above 100% FPL but at or below 120% FPL
|
|
16
|
+
p = parameters(
|
|
17
|
+
period
|
|
18
|
+
).gov.hhs.medicare.savings_programs.eligibility.income
|
|
19
|
+
|
|
20
|
+
medicare_eligible = person("is_medicare_eligible", period.this_year)
|
|
21
|
+
asset_eligible = person("msp_asset_eligible", period)
|
|
22
|
+
|
|
23
|
+
fpg = person("msp_fpg", period)
|
|
24
|
+
countable_income = person("msp_countable_income", period)
|
|
25
|
+
|
|
26
|
+
qmb_income_limit = fpg * p.qmb.fpl_limit
|
|
27
|
+
slmb_income_limit = fpg * p.slmb.fpl_limit
|
|
28
|
+
|
|
29
|
+
income_above_qmb = countable_income > qmb_income_limit
|
|
30
|
+
income_at_or_below_slmb = countable_income <= slmb_income_limit
|
|
31
|
+
income_eligible = income_above_qmb & income_at_or_below_slmb
|
|
32
|
+
|
|
33
|
+
return medicare_eligible & income_eligible & asset_eligible
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MSPCategory(Enum):
|
|
5
|
+
NONE = "None"
|
|
6
|
+
QMB = "Qualified Medicare Beneficiary"
|
|
7
|
+
SLMB = "Specified Low-Income Medicare Beneficiary"
|
|
8
|
+
QI = "Qualifying Individual"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class msp_category(Variable):
|
|
12
|
+
value_type = Enum
|
|
13
|
+
possible_values = MSPCategory
|
|
14
|
+
default_value = MSPCategory.NONE
|
|
15
|
+
entity = Person
|
|
16
|
+
label = "Medicare Savings Program category"
|
|
17
|
+
definition_period = MONTH
|
|
18
|
+
reference = (
|
|
19
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
20
|
+
"https://www.law.cornell.edu/cfr/text/42/435.121",
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
def formula(person, period, parameters):
|
|
24
|
+
qmb = person("is_qmb_eligible", period)
|
|
25
|
+
slmb = person("is_slmb_eligible", period)
|
|
26
|
+
qi = person("is_qi_eligible", period)
|
|
27
|
+
|
|
28
|
+
# Priority: QMB > SLMB > QI (QMB is most comprehensive)
|
|
29
|
+
return select(
|
|
30
|
+
[qmb, slmb, qi],
|
|
31
|
+
[MSPCategory.QMB, MSPCategory.SLMB, MSPCategory.QI],
|
|
32
|
+
default=MSPCategory.NONE,
|
|
33
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class msp_asset_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare Savings Program asset eligible"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
11
|
+
"https://www.medicareinteractive.org/understanding-medicare/"
|
|
12
|
+
"cost-saving-programs/medicare-savings-programs-qmb-slmb-qi/"
|
|
13
|
+
"medicare-savings-program-income-and-asset-limits",
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
def formula(person, period, parameters):
|
|
17
|
+
p = parameters(period).gov.hhs.medicare.savings_programs.eligibility
|
|
18
|
+
state_code = person.household("state_code_str", period)
|
|
19
|
+
# Check if asset test applies (some states have eliminated it)
|
|
20
|
+
asset_test_applies = p.asset.applies[state_code]
|
|
21
|
+
# If asset test doesn't apply, everyone is asset-eligible
|
|
22
|
+
cash_assets = person.spm_unit("spm_unit_cash_assets", period.this_year)
|
|
23
|
+
married = person.spm_unit("spm_unit_is_married", period)
|
|
24
|
+
asset_limit = where(married, p.asset.couple, p.asset.individual)
|
|
25
|
+
meets_asset_test = cash_assets <= asset_limit
|
|
26
|
+
return where(asset_test_applies, meets_asset_test, True)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class msp_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare Savings Program eligible"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
11
|
+
"https://www.law.cornell.edu/cfr/text/42/435.121",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(person, period, parameters):
|
|
15
|
+
# Must be Medicare eligible
|
|
16
|
+
medicare_eligible = person("is_medicare_eligible", period.this_year)
|
|
17
|
+
income_eligible = person("msp_income_eligible", period)
|
|
18
|
+
asset_eligible = person("msp_asset_eligible", period)
|
|
19
|
+
|
|
20
|
+
return medicare_eligible & income_eligible & asset_eligible
|
policyengine_us/variables/gov/hhs/medicare/savings_programs/eligibility/msp_income_eligible.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class msp_income_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Medicare Savings Program income eligible"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
11
|
+
"https://www.law.cornell.edu/cfr/text/42/435.121",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(person, period, parameters):
|
|
15
|
+
# Income eligible if under the QI threshold (135% FPL)
|
|
16
|
+
# which is the highest threshold for standard MSP levels
|
|
17
|
+
p = parameters(
|
|
18
|
+
period
|
|
19
|
+
).gov.hhs.medicare.savings_programs.eligibility.income.qi
|
|
20
|
+
fpg = person("msp_fpg", period)
|
|
21
|
+
countable_income = person("msp_countable_income", period)
|
|
22
|
+
|
|
23
|
+
# Use QI threshold (135% FPL) as the outer bound
|
|
24
|
+
qi_income_limit = fpg * p.fpl_limit
|
|
25
|
+
|
|
26
|
+
return countable_income <= qi_income_limit
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
from policyengine_us.variables.gov.ssa.ssi.eligibility.income._apply_ssi_exclusions import (
|
|
3
|
+
_apply_ssi_exclusions,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class msp_countable_income(Variable):
|
|
8
|
+
value_type = float
|
|
9
|
+
entity = Person
|
|
10
|
+
unit = USD
|
|
11
|
+
label = "Medicare Savings Program countable monthly income"
|
|
12
|
+
definition_period = MONTH
|
|
13
|
+
reference = (
|
|
14
|
+
"https://www.law.cornell.edu/uscode/text/42/1396d#p",
|
|
15
|
+
"https://secure.ssa.gov/apps10/poms.nsf/lnx/0501715010",
|
|
16
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
17
|
+
)
|
|
18
|
+
documentation = """
|
|
19
|
+
MSP countable income uses SSI methodology per 42 U.S.C. 1396d(p)(1)(B),
|
|
20
|
+
which specifies income "determined under section 1382a" (SSI rules).
|
|
21
|
+
This applies the standard SSI exclusions:
|
|
22
|
+
1. $20 general income exclusion (from unearned first)
|
|
23
|
+
2. $65 earned income exclusion
|
|
24
|
+
3. 50% of remaining earned income excluded
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def formula(person, period, parameters):
|
|
28
|
+
# MSP uses SSI income methodology per 42 U.S.C. 1396d(p)(1)(B)
|
|
29
|
+
earned = person("ssi_earned_income", period.this_year)
|
|
30
|
+
unearned = person("ssi_unearned_income", period.this_year)
|
|
31
|
+
# Apply SSI exclusions ($20 general, $65 earned, 50% remaining)
|
|
32
|
+
annual_countable = _apply_ssi_exclusions(
|
|
33
|
+
earned, unearned, parameters, period.this_year
|
|
34
|
+
)
|
|
35
|
+
return annual_countable / MONTHS_IN_YEAR
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class msp_fpg(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
unit = USD
|
|
8
|
+
label = "MSP Federal Poverty Guideline"
|
|
9
|
+
definition_period = YEAR
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.law.cornell.edu/uscode/text/42/1396d#p",
|
|
12
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
13
|
+
)
|
|
14
|
+
documentation = """
|
|
15
|
+
The Federal Poverty Guideline used for MSP eligibility is based on
|
|
16
|
+
individual or couple status, not the full household/SPM unit size.
|
|
17
|
+
Per 42 U.S.C. 1396d(p), MSP income limits are based on the federal
|
|
18
|
+
poverty line for a family of the size involved.
|
|
19
|
+
|
|
20
|
+
Note: Published Medicare.gov limits are $20/month higher than raw FPL
|
|
21
|
+
because they include the $20 general income exclusion in the threshold.
|
|
22
|
+
Our implementation applies the $20 exclusion to income instead, which
|
|
23
|
+
is mathematically equivalent: (income - $20) <= FPL == income <= (FPL + $20)
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
def formula(person, period, parameters):
|
|
27
|
+
# MSP uses individual (1 person) or couple (2 persons) FPG,
|
|
28
|
+
# not the full SPM unit size.
|
|
29
|
+
# Note: These are raw FPL values. Published limits are $20 higher
|
|
30
|
+
# because we apply the $20 exclusion to income (msp_countable_income)
|
|
31
|
+
# rather than adding it to the threshold.
|
|
32
|
+
married = person.spm_unit("spm_unit_is_married", period)
|
|
33
|
+
state_group = person.household("state_group_str", period)
|
|
34
|
+
p = parameters(period).gov.hhs.fpg
|
|
35
|
+
p1 = p.first_person[state_group]
|
|
36
|
+
pn = p.additional_person[state_group]
|
|
37
|
+
# 1 person if single, 2 persons if married
|
|
38
|
+
individual_fpg = p1
|
|
39
|
+
couple_fpg = p1 + pn
|
|
40
|
+
return where(married, couple_fpg, individual_fpg)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class msp(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
unit = USD
|
|
8
|
+
label = "Medicare Savings Program benefit"
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
12
|
+
)
|
|
13
|
+
defined_for = "msp_eligible"
|
|
14
|
+
|
|
15
|
+
adds = ["msp_benefit_value"]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
from policyengine_us.variables.gov.hhs.medicare.savings_programs.category.msp_category import (
|
|
3
|
+
MSPCategory,
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class msp_benefit_value(Variable):
|
|
8
|
+
value_type = float
|
|
9
|
+
entity = Person
|
|
10
|
+
unit = USD
|
|
11
|
+
label = "Medicare Savings Program estimated monthly benefit value"
|
|
12
|
+
definition_period = MONTH
|
|
13
|
+
reference = (
|
|
14
|
+
"https://www.medicare.gov/basics/costs/help/medicare-savings-programs",
|
|
15
|
+
)
|
|
16
|
+
defined_for = "msp_eligible"
|
|
17
|
+
|
|
18
|
+
def formula(person, period, parameters):
|
|
19
|
+
category = person("msp_category", period)
|
|
20
|
+
|
|
21
|
+
# Get premiums (automatically disaggregated from annual to monthly)
|
|
22
|
+
part_a_premium = person("base_part_a_premium", period)
|
|
23
|
+
part_b_premium = person("base_part_b_premium", period)
|
|
24
|
+
|
|
25
|
+
# Benefit depends on category:
|
|
26
|
+
# QMB: Part A + Part B premiums (plus deductibles/copays, not modeled)
|
|
27
|
+
# SLMB: Part B premium only
|
|
28
|
+
# QI: Part B premium only
|
|
29
|
+
is_qmb = category == MSPCategory.QMB
|
|
30
|
+
is_slmb = category == MSPCategory.SLMB
|
|
31
|
+
is_qi = category == MSPCategory.QI
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
is_qmb * (part_a_premium + part_b_premium)
|
|
35
|
+
+ is_slmb * part_b_premium
|
|
36
|
+
+ is_qi * part_b_premium
|
|
37
|
+
)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class taxable_social_security_tier_1(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Taxable Social Security (tier 1)"
|
|
9
|
+
documentation = "Taxable Social Security from 0-50% taxation tier, credited to OASDI trust funds"
|
|
10
|
+
unit = USD
|
|
11
|
+
reference = "https://www.law.cornell.edu/uscode/text/26/86#a_1"
|
|
12
|
+
|
|
13
|
+
def formula(tax_unit, period, parameters):
|
|
14
|
+
p = parameters(period).gov.irs.social_security.taxability
|
|
15
|
+
gross_ss = tax_unit("tax_unit_social_security", period)
|
|
16
|
+
combined_income = tax_unit(
|
|
17
|
+
"tax_unit_combined_income_for_social_security_taxability", period
|
|
18
|
+
)
|
|
19
|
+
filing_status = tax_unit("filing_status", period)
|
|
20
|
+
status = filing_status.possible_values
|
|
21
|
+
separate = filing_status == status.SEPARATE
|
|
22
|
+
cohabitating = tax_unit("cohabitating_spouses", period)
|
|
23
|
+
|
|
24
|
+
base_amount = where(
|
|
25
|
+
separate & cohabitating,
|
|
26
|
+
p.threshold.base.separate_cohabitating,
|
|
27
|
+
p.threshold.base.main[filing_status],
|
|
28
|
+
)
|
|
29
|
+
adjusted_base_amount = where(
|
|
30
|
+
separate & cohabitating,
|
|
31
|
+
p.threshold.adjusted_base.separate_cohabitating,
|
|
32
|
+
p.threshold.adjusted_base.main[filing_status],
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
under_first_threshold = combined_income < base_amount
|
|
36
|
+
under_second_threshold = combined_income < adjusted_base_amount
|
|
37
|
+
|
|
38
|
+
combined_income_excess = tax_unit(
|
|
39
|
+
"tax_unit_ss_combined_income_excess", period
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# Tier 1 amount (IRC §86(a)(1))
|
|
43
|
+
amount_under_paragraph_1 = min_(
|
|
44
|
+
p.rate.base.benefit_cap * gross_ss,
|
|
45
|
+
p.rate.base.excess * combined_income_excess,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
# Bracket amount when in tier 2 (IRC §86(a)(2)(A)(ii))
|
|
49
|
+
bracket_amount = min_(
|
|
50
|
+
amount_under_paragraph_1,
|
|
51
|
+
p.rate.additional.bracket * (adjusted_base_amount - base_amount),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
return select(
|
|
55
|
+
[under_first_threshold, under_second_threshold],
|
|
56
|
+
[0, amount_under_paragraph_1],
|
|
57
|
+
default=bracket_amount,
|
|
58
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class taxable_social_security_tier_2(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Taxable Social Security (tier 2)"
|
|
9
|
+
documentation = "Taxable Social Security from 50-85% taxation tier, credited to Medicare HI trust fund"
|
|
10
|
+
unit = USD
|
|
11
|
+
reference = "https://www.law.cornell.edu/uscode/text/26/86#a_2"
|
|
12
|
+
|
|
13
|
+
# tier_2 = total_taxable - tier_1 capped at 0
|
|
14
|
+
def formula(tax_unit, period, parameters):
|
|
15
|
+
tier_1 = tax_unit("taxable_social_security_tier_1", period)
|
|
16
|
+
total_taxable = tax_unit("tax_unit_taxable_social_security", period)
|
|
17
|
+
return max_(total_taxable - tier_1, 0)
|
policyengine_us/variables/gov/simulation/labor_supply_response/labor_supply_behavioral_response.py
CHANGED
|
@@ -16,53 +16,68 @@ class labor_supply_behavioral_response(Variable):
|
|
|
16
16
|
if p.elasticities.income == 0 and p.elasticities.substitution.all == 0:
|
|
17
17
|
return 0
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
baseline_branch.tax_benefit_system.parameters.simulation = (
|
|
26
|
-
measurement_branch.tax_benefit_system.parameters.simulation
|
|
27
|
-
)
|
|
19
|
+
# Guard against re-entry (prevents recursion when branches calculate variables)
|
|
20
|
+
if (
|
|
21
|
+
hasattr(simulation, "_lsr_calculating")
|
|
22
|
+
and simulation._lsr_calculating
|
|
23
|
+
):
|
|
24
|
+
return 0
|
|
28
25
|
|
|
29
|
-
#
|
|
30
|
-
|
|
31
|
-
# * -(baseline system without LSRs used to calculate LSRs)
|
|
26
|
+
# Mark that we're calculating LSR
|
|
27
|
+
simulation._lsr_calculating = True
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
period,
|
|
43
|
-
person("employment_income_before_lsr", period),
|
|
29
|
+
try:
|
|
30
|
+
measurement_branch = simulation.get_branch(
|
|
31
|
+
"lsr_measurement", clone_system=True
|
|
32
|
+
) # A branch without LSRs
|
|
33
|
+
baseline_branch = simulation.get_branch("baseline").get_branch(
|
|
34
|
+
"baseline_lsr_measurement", clone_system=True
|
|
35
|
+
) # Already created by default
|
|
36
|
+
baseline_branch.tax_benefit_system.parameters.simulation = (
|
|
37
|
+
measurement_branch.tax_benefit_system.parameters.simulation
|
|
44
38
|
)
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
|
|
40
|
+
# (system with LSRs) <- (system without LSRs used to calculate LSRs)
|
|
41
|
+
# |
|
|
42
|
+
# * -(baseline system without LSRs used to calculate LSRs)
|
|
43
|
+
|
|
44
|
+
for branch in [measurement_branch, baseline_branch]:
|
|
45
|
+
branch.tax_benefit_system.neutralize_variable(
|
|
46
|
+
"employment_income_behavioral_response"
|
|
47
|
+
)
|
|
48
|
+
branch.tax_benefit_system.neutralize_variable(
|
|
49
|
+
"self_employment_income_behavioral_response"
|
|
50
|
+
)
|
|
51
|
+
branch.set_input(
|
|
52
|
+
"employment_income_before_lsr",
|
|
53
|
+
period,
|
|
54
|
+
person("employment_income_before_lsr", period),
|
|
55
|
+
)
|
|
56
|
+
branch.set_input(
|
|
57
|
+
"self_employment_income_before_lsr",
|
|
58
|
+
period,
|
|
59
|
+
person("self_employment_income_before_lsr", period),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
response = add(
|
|
63
|
+
person,
|
|
47
64
|
period,
|
|
48
|
-
|
|
65
|
+
[
|
|
66
|
+
"income_elasticity_lsr",
|
|
67
|
+
"substitution_elasticity_lsr",
|
|
68
|
+
],
|
|
49
69
|
)
|
|
70
|
+
simulation = person.simulation
|
|
71
|
+
del simulation.branches["baseline"].branches[
|
|
72
|
+
"baseline_lsr_measurement"
|
|
73
|
+
]
|
|
74
|
+
del simulation.branches["lsr_measurement"]
|
|
50
75
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
period,
|
|
54
|
-
[
|
|
55
|
-
"income_elasticity_lsr",
|
|
56
|
-
"substitution_elasticity_lsr",
|
|
57
|
-
],
|
|
58
|
-
)
|
|
59
|
-
simulation = person.simulation
|
|
60
|
-
del simulation.branches["baseline"].branches[
|
|
61
|
-
"baseline_lsr_measurement"
|
|
62
|
-
]
|
|
63
|
-
del simulation.branches["lsr_measurement"]
|
|
76
|
+
simulation.macro_cache_read = False
|
|
77
|
+
simulation.macro_cache_write = False
|
|
64
78
|
|
|
65
|
-
|
|
66
|
-
simulation.macro_cache_write = False
|
|
79
|
+
return response
|
|
67
80
|
|
|
68
|
-
|
|
81
|
+
finally:
|
|
82
|
+
# Clear the re-entry guard
|
|
83
|
+
simulation._lsr_calculating = False
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class employer_medicare_tax_income_tax_revenue(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Income tax revenue from taxing employer Medicare contributions"
|
|
9
|
+
documentation = (
|
|
10
|
+
"Marginal income tax revenue attributable to including employer "
|
|
11
|
+
"Medicare contributions in taxable income. This revenue "
|
|
12
|
+
"is credited to the Medicare HI trust fund."
|
|
13
|
+
)
|
|
14
|
+
unit = USD
|
|
15
|
+
|
|
16
|
+
def formula(tax_unit, period, parameters):
|
|
17
|
+
"""
|
|
18
|
+
Calculate Medicare HI trust fund revenue from employer Medicare taxation.
|
|
19
|
+
|
|
20
|
+
Method:
|
|
21
|
+
1. Get current income_tax (with BOTH SS + Medicare in AGI from reform)
|
|
22
|
+
2. Branch: Neutralize employer_medicare_tax, recalculate income_tax
|
|
23
|
+
3. Medicare revenue = current_tax - tax_without_medicare
|
|
24
|
+
|
|
25
|
+
This isolates the marginal tax contribution from employer Medicare by
|
|
26
|
+
neutralizing the source variable, letting the reform formula
|
|
27
|
+
naturally exclude Medicare when calculating gross income.
|
|
28
|
+
"""
|
|
29
|
+
sim = tax_unit.simulation
|
|
30
|
+
|
|
31
|
+
# Check if reform is active
|
|
32
|
+
p = parameters(period).gov.contrib.crfb.tax_employer_payroll_tax
|
|
33
|
+
if not p.in_effect:
|
|
34
|
+
return tax_unit.empty_array()
|
|
35
|
+
|
|
36
|
+
# Current tax (with reform - both SS and Medicare in AGI)
|
|
37
|
+
tax_full = tax_unit("income_tax", period)
|
|
38
|
+
|
|
39
|
+
# === Branch: Tax WITHOUT employer Medicare (neutralize source) ===
|
|
40
|
+
branch = sim.get_branch("without_employer_medicare", clone_system=True)
|
|
41
|
+
|
|
42
|
+
# Neutralize the source variable - reform formula will pick up 0 for Medicare
|
|
43
|
+
branch.tax_benefit_system.neutralize_variable("employer_medicare_tax")
|
|
44
|
+
|
|
45
|
+
# Clear cached calculations
|
|
46
|
+
input_vars = set(branch.input_variables)
|
|
47
|
+
for var_name in list(branch.tax_benefit_system.variables.keys()):
|
|
48
|
+
if var_name not in input_vars:
|
|
49
|
+
try:
|
|
50
|
+
branch.delete_arrays(var_name)
|
|
51
|
+
except:
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
tax_without_medicare = branch.tax_unit("income_tax", period)
|
|
55
|
+
del sim.branches["without_employer_medicare"]
|
|
56
|
+
|
|
57
|
+
# Medicare revenue = tax with full reform - tax without Medicare
|
|
58
|
+
return max_(tax_full - tax_without_medicare, 0)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class employer_ss_tax_income_tax_revenue(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Income tax revenue from taxing employer SS contributions"
|
|
9
|
+
documentation = (
|
|
10
|
+
"Marginal income tax revenue attributable to including employer "
|
|
11
|
+
"Social Security contributions in taxable income. This revenue "
|
|
12
|
+
"is credited to the OASDI trust funds."
|
|
13
|
+
)
|
|
14
|
+
unit = USD
|
|
15
|
+
|
|
16
|
+
def formula(tax_unit, period, parameters):
|
|
17
|
+
"""
|
|
18
|
+
Calculate OASDI trust fund revenue from employer SS taxation.
|
|
19
|
+
|
|
20
|
+
Method:
|
|
21
|
+
1. Get current income_tax (with BOTH SS + Medicare in AGI from reform)
|
|
22
|
+
2. Branch: Neutralize employer_social_security_tax, recalculate income_tax
|
|
23
|
+
3. SS revenue = current_tax - tax_without_ss
|
|
24
|
+
|
|
25
|
+
This isolates the marginal tax contribution from employer SS by
|
|
26
|
+
neutralizing the source variable, letting the reform formula
|
|
27
|
+
naturally exclude SS when calculating gross income.
|
|
28
|
+
"""
|
|
29
|
+
sim = tax_unit.simulation
|
|
30
|
+
|
|
31
|
+
# Check if reform is active
|
|
32
|
+
p = parameters(period).gov.contrib.crfb.tax_employer_payroll_tax
|
|
33
|
+
if not p.in_effect:
|
|
34
|
+
return tax_unit.empty_array()
|
|
35
|
+
|
|
36
|
+
# Current tax (with reform - both SS and Medicare in AGI)
|
|
37
|
+
tax_full = tax_unit("income_tax", period)
|
|
38
|
+
|
|
39
|
+
# === Branch: Tax WITHOUT employer SS (neutralize source) ===
|
|
40
|
+
branch = sim.get_branch("without_employer_ss", clone_system=True)
|
|
41
|
+
|
|
42
|
+
# Neutralize the source variable - reform formula will pick up 0 for SS
|
|
43
|
+
branch.tax_benefit_system.neutralize_variable(
|
|
44
|
+
"employer_social_security_tax"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# Clear cached calculations
|
|
48
|
+
input_vars = set(branch.input_variables)
|
|
49
|
+
for var_name in list(branch.tax_benefit_system.variables.keys()):
|
|
50
|
+
if var_name not in input_vars:
|
|
51
|
+
try:
|
|
52
|
+
branch.delete_arrays(var_name)
|
|
53
|
+
except:
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
tax_without_ss = branch.tax_unit("income_tax", period)
|
|
57
|
+
del sim.branches["without_employer_ss"]
|
|
58
|
+
|
|
59
|
+
# SS revenue = tax with full reform - tax without SS
|
|
60
|
+
return max_(tax_full - tax_without_ss, 0)
|