PSLmodels / Tax-Calculator

USA Federal Individual Income and Payroll Tax Microsimulation Model
https://taxcalc.pslmodels.org
Other
262 stars 157 forks source link

better mapping of Child and Dependent Care Expenses Credit #2710

Closed bodiyang closed 8 months ago

bodiyang commented 9 months ago

Change of the mapping of the variable Child and Dependent Care Expenses Credit, to TAXSIM35.

c07180 and CDCC_refund mapping value will be changed correspondingly

jdebacker commented 8 months ago

@bodiyang Thanks for looking at this. Can you give some more context to what you are doing in this PR so we have it for the record? Thanks!

bodiyang commented 8 months ago

There are two issues solved in this PR (1)c07180 takes the f2441 as number of qualified child under 13, as in calcfunctions.py

When mapping from TAXSIM to Tax-Calc, we only used to have dep13 -> nu13, but no mapping for f2331, that's why c07180 was zero out in Tax-Calc.

After adding the mapping of f2441, Tax-Calc is able to produce the correct c07180 result.

(2)Child and Dependent Care Credit is refundable for 2021, not refundable for the rest years. c07180 is the non-refundable CDCC, so is zero in 2021. In order to compare the CDCC amount in 2021 with TAXSIM, we need to map c07180 t0 CDCC_refund in 2021

feenberg commented 8 months ago

Perhaps you should shift to using the dependent age variables in taxsim35 (age1,age2, age3) which lets taxsim calculate the number of eligible children.

Daniel Feenberg

On Mon, 5 Feb 2024, Bodi Yang wrote:

There are two issues solved in this PR (1)c07180 takes the f2441 as number of qualified child under 13, as in calcfunctions.py

When mapping from TAXSIM to Tax-Calc, we only used to have dep13 -> nu13, but no mapping for f2331, that's why c07180 was zero out in Tax-Calc.

After adding the mapping of f2441, Tax-Calc is able to produce the correct c07180 result.

(2)Child and Dependent Care Credit is refundable for 2021, not refundable for the rest years. c07180 is the non-refundable CDCC, so is zero in 2021. In order to compare the CDCC amount in 2021 with TAXSIM, we need to map c07180 t0 CDCC_refund in 2021

-- Reply to this email directly or view it on GitHub: https://github.com/PSLmodels/Tax-Calculator/pull/2710#issuecomment-1927129929 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

bodiyang commented 8 months ago

Perhaps you should shift to using the dependent age variables in taxsim35 (age1,age2, age3) which lets taxsim calculate the number of eligible children. Daniel Feenberg On Mon, 5 Feb 2024, Bodi Yang wrote: There are two issues solved in this PR (1)c07180 takes the f2441 as number of qualified child under 13, as in calcfunctions.py When mapping from TAXSIM to Tax-Calc, we only used to have dep13 -> nu13, but no mapping for f2331, that's why c07180 was zero out in Tax-Calc. After adding the mapping of f2441, Tax-Calc is able to produce the correct c07180 result. (2)Child and Dependent Care Credit is refundable for 2021, not refundable for the rest years. c07180 is the non-refundable CDCC, so is zero in 2021. In order to compare the CDCC amount in 2021 with TAXSIM, we need to map c07180 t0 CDCC_refund in 2021 -- Reply to this email directly or view it on GitHub: #2710 (comment) You are receiving this because you are subscribed to this thread. Message ID: @.***>

Thanks for the note Daniel. This PS's issue is a fix on the Tax-Calculator side.

~ I have already mapped the TAXSIM age variables (age1,age2, age3) to Tax-Calc age variables

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (43f8313) 98.54% compared to head (e4970fc) 98.54%. Report is 1 commits behind head on master.

:exclamation: Current head e4970fc differs from pull request most recent head 0521507. Consider uploading reports for the commit 0521507 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2710/graphs/tree.svg?width=650&height=150&src=pr&token=KqtTvRSNjQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2710?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #2710 +/- ## ======================================= Coverage 98.54% 98.54% ======================================= Files 14 14 Lines 2616 2616 ======================================= Hits 2578 2578 Misses 38 38 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2710/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2710/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `98.54% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more.
jdebacker commented 8 months ago

@bodiyang I think this is a nice mapping to make for comparisons to TAXSIM. Thank you for the PR!