PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
103 stars 176 forks source link

Fix Michigan household resources calculation #4323

Closed martinholmer closed 7 months ago

martinholmer commented 7 months ago

In the 0.721.0 version, it seems as if the calculation of the mi_household_resources is not correct. At least, I can't find anyplace in the cited legislation or in the form or its instructions that says federal above-the-line deductions should be subtracted or says that health insurance premiums should be subtracted.

https://github.com/PolicyEngine/policyengine-us/blob/dbe2554743360b80fa3bd375c03a9988fe8d3772/policyengine_us/variables/gov/states/mi/tax/income/mi_household_resources.py#L4-L13

TAXSIM35 does not subtract federal above-the-line deductions, and as a result it generates different results for the following test case:

- name: Tax unit with taxsimid 13598 in j21.its.csv and j21.ots.csv
  absolute_error_margin: 0.01
  period: 2021
  input:
    people:
      person1:
        age: 30
        employment_income: 1010
        qualified_dividend_income: 9010
        taxable_interest_income: 11010
        short_term_capital_gains: 1010
        rental_income: 1010
        rent: 14000
        self_employment_income: 1010
        business_is_qualified: true
        business_is_sstb: false
        w2_wages_from_qualified_business: 100e6
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
        ma_covid_19_essential_employee_premium_pay_program: 0  # not in TAXSIM35
      person2:
        age: 16
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
        ma_covid_19_essential_employee_premium_pay_program: 0  # not in TAXSIM35
      person3:
        age: 16
        ssi: 0  # not in TAXSIM35
        state_supplement: 0  # not in TAXSIM35
        wic: 0  # not in TAXSIM35
        ma_covid_19_essential_employee_premium_pay_program: 0  # not in TAXSIM35
    tax_units:
      tax_unit:
        members: [person1, person2, person3]
        premium_tax_credit: 0  # not in TAXSIM35
        local_income_tax: 0  # not in TAXSIM35
        state_sales_tax: 0  # not in TAXSIM35
        ca_use_tax: 0  # not in TAXSIM35
        il_use_tax: 0  # not in TAXSIM35
        nm_2021_income_rebate: 0  # not in TAXSIM35
        nm_additional_2021_income_rebate: 0  # not in TAXSIM35
        nm_supplemental_2021_income_rebate: 0  # not in TAXSIM35
        ny_supplemental_eitc: 0  # not in TAXSIM35
        ok_use_tax: 0  # not in TAXSIM35
        pa_use_tax: 0  # not in TAXSIM35
        vt_renter_credit: 0  # not in TAXSIM35
    spm_units:
      spm_unit:
        members: [person1, person2, person3]
        snap: 0  # not in TAXSIM35
        tanf: 0  # not in TAXSIM35
    households:
      household:
        members: [person1, person2, person3]
        state_fips: 26  # MI
  output:  # expected results from patched TAXSIM35 2024-03-26 version
    mi_income_tax: -1077.46
Mshuning commented 7 months ago

Please refer to the line 30-33 in https://www.michigan.gov/taxes/-/media/Project/Websites/taxes/Forms/2022/2022-IIT-Forms/MI-1040CR.pdf#page=2, and also in https://www.michigan.gov/taxes/-/media/Project/Websites/taxes/Forms/2022/2022-IIT-Forms/BOOK_MI-1040.pdf#page=33

martinholmer commented 7 months ago

@Mshuning, Thanks for pointing out the MI form instructions that I had missed. You are right that the PEUS household resources is correct. I'll check to see what is going on in the TAXSIM35 code.