Skip to content

Commit

Permalink
Merge pull request #2705 from jdebacker/taxsim_b_set
Browse files Browse the repository at this point in the history
TAXSIM-35 Validation, "b" files
jdebacker authored Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents e2f14f3 + 7c9e432 commit 39f7502
Showing 10 changed files with 227 additions and 8 deletions.
33 changes: 26 additions & 7 deletions taxcalc/validation/taxsim35/Differences_Explained.md
Original file line number Diff line number Diff line change
@@ -2,20 +2,39 @@

This document explains the sources of known differences (that exceed $1) between Tax-Calculator and TAXSIM-35. Numerical differences are noted in the {letter}{year}-taxdiffs-actual.csv files in this directory.

## 2017
## `a` files:
### 2017

* No differences greater than $1 (though one obs with an marginal tax rate differences of 7.65 percent)

## 2018
### 2018

* No differences greater than $1.


## 2019
### 2019

* There is one record in the "a" file with a difference in the EITC amount of $196.22. This record is of a single, 19 year old filer. This person is below the age of 25 and therefore should receive $0 EITC, which is what Tax-Calculator reports. TAXSIM-35 does not recognize this age threshold and incorrectly assigns this person $196.22 in EITC.
* The same record has a marginal tax rate difference of 7.65 percent, which is the phase in rate for the EITC and thus related to the above issue.

## 2020
* Numerous records in the test files with differences in the recorvery rebate credit amount (RRC). The reasons TAXSIM-35 shows different results vary and include: TAXSIM-35 not counting qualifying children (e.g., file "a", id 7); TAXSIM-35 not differentiating single/head of household filing status (e.g., file "a",id 31); and TAXSIM-35 not counting Economic Impat Payment 2 (e.g., file "a",id 33); TAXSIM-35 counts wrong number of child (e.g., file "a",id 59). Note that some of these are not errors per se, but can be related to different variable inputs in the two models.
### 2020

* Numerous records in the test files with differences in the recovery rebate credit amount (RRC). The reasons TAXSIM-35 shows different results vary and include: TAXSIM-35 not counting qualifying children (e.g., file "a", id 7); TAXSIM-35 not differentiating single/head of household filing status (e.g., file "a",id 31); and TAXSIM-35 not counting Economic Impact Payment 2 (e.g., file "a",id 33); TAXSIM-35 counts wrong number of child (e.g., file "a",id 59). Note that some of these are not errors per se, but can be related to different variable inputs in the two models.

### 2021

* In 2021, the Additional Child Tax Credit (ACTC), which historically was the refundable portion of the CTC, was subsumed by the refundability of the CTC more broadly with the ARPA. Tax-Calculator and TAXSIM-35 handle this differently in their model output. Tax-Calculator keeps only the ACTC amount in the variable `c11070`, which is $0 for all filers in 2021. On the other hand, TAXSIM-35 reports the refundable amount of the CTC (which is equivalent to the ACTC in most years, but not 2021). Hence, we can expect differences in these two models due to different definitions of output variables in that year. The file `process_taxcalc_output.py` makes and adjustment for 2021 to make the output from both models more comparable.

## `b` files:

### All years

* Differences in AGI between TAXMSIM and Tax-Calculator have to do with an incorrect calculation of the SECA tax liability in TAXSIM-35. Half of the SECA tax amount is deductible from AGI on individuals' returns.
* TAXSIM-35 does not correctly calculate payroll tax liability, while Tax-Calculator calculations have been verified manually. Thus, payroll tax liability differs between the two models. An updated version of TAXSIM (not available publicaly on 2024-02-29) shows not differences in FICA liability with Tax-Calculator.
* The AMT liability is zero in TAXSIM-35, but correct in Tax-Calculator, thus the AMT liability difference is the AMT liability in Tax-Calculator.
* Other differences (in `c04800`, `taxbc`, `c62100`, and `iitax_before_credits_ex_AMT`) are due to downstream effects of the differences documented above.

### 2020

## 2021
* In 2021, the Additional Child Tax Credit (ACTC), which historically was the refundable portion of the CTC, was subsumbed by the refundability of the CTC more broadly with the ARPA. Tax-Calculator and TAXSIM-35 handle this differnetly in their model output. Tax-Calculator keeps only the ACTC amount in the variable `c11070`, which is $0 for all filers in 2021. On the other hand, TAXSIM-35 reports the refundable amount of the CTC (whih is equivalent to the ACTC in most years, but not 2021). Hence, we can expect differences in these two models due to different definitions of output variables in that year. The file `process_taxcalc_output.py` makes and adjustment for 2021 to make the output from both models more comparable.
* Three records in the test files with differences in the recovery rebate credit amount (RRC). The reasons TAXSIM-35 shows different results vary and include: TAXSIM-35 not counting qualifying children (e.g., file "a", id 7); TAXSIM-35 not differentiating single/head of household filing status (e.g., file "a",id 31); and TAXSIM-35 not counting Economic Impact Payment 2 (e.g., file "a",id 33); TAXSIM-35 counts wrong number of child (e.g., file "a",id 59). Note that some of these are not errors per se, but can be related to different variable inputs in the two models.
* There is also a single record with a differences in `e02300`, unemployment insurance benefits, and input to the models. This variable is zeroed out in TAXSIM-35, but not in Tax-Calculator.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,496,-3122.1300000000047,464,346693.19,343571.06
statetax,0,0.0,no diff,no diff,no diff
payrolltax,944,15766.129999999997,464,42759.4,58525.53
mtr_inctax,371,-13.869999999999997,644,41.87,28.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,563,-7884.170000000042,464,1028327.24,1020443.07
e02300,0,0.0,no diff,no diff,no diff
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,24,566.7500000000005,739,3913.52,4480.27
phased_out_pe,28,-566.75,739,12286.48,11719.73
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,560,-8221.450000000012,141,399715.05,391493.6
taxbc,984,-8184.830000000016,454,243008.07,234823.24
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,0,0.0,no diff,no diff,no diff
c11070,0,0.0,no diff,no diff,no diff
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,563,-7884.170000000042,464,1028327.24,1020443.07
amt_liability,26,233.2,644,0.0,233.2
iitax_before_credits_ex_AMT,507,-3122.1300000000047,464,346047.19,342925.06
recovery_rebate_credit,0,0.0,no diff,no diff,no diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,1000,-28040.51999999996,221,465566.97,437526.45
statetax,0,0.0,no diff,no diff,no diff
payrolltax,942,15897.89,861,43904.8,59802.69
mtr_inctax,445,-15.39,869,48.39,33.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,567,-7949.869999999995,861,984467.76,976517.89
e02300,0,0.0,no diff,no diff,no diff
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,0,0.0,no diff,no diff,no diff
phased_out_pe,0,0.0,no diff,no diff,no diff
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,1000,-77330.33000000007,239,1308141.76,1230811.43
taxbc,1000,-32120.51999999996,221,467556.97,435436.45
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,15,311.75,930,1355.76,1667.51
c11070,0,0.0,no diff,no diff,no diff
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,1000,134121.56000000006,353,1329565.93,1463687.49
amt_liability,305,20536.04,892,0.0,20536.04
iitax_before_credits_ex_AMT,1000,-28612.22000000003,239,419991.45,391379.23
recovery_rebate_credit,0,0.0,no diff,no diff,no diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,1000,-28131.679999999993,956,292614.24,264482.56
statetax,0,0.0,no diff,no diff,no diff
payrolltax,946,16470.230000000003,583,42555.56,59025.79
mtr_inctax,428,-16.990000000000002,431,44.99,28.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,535,-8235.959999999963,583,1095818.15,1087582.19
e02300,0,0.0,no diff,no diff,no diff
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,0,0.0,no diff,no diff,no diff
phased_out_pe,0,0.0,no diff,no diff,no diff
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,1000,-77845.41000000003,956,960616.86,882771.45
taxbc,1000,-31634.48999999999,600,394678.94,363044.45
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,9,389.85000000000014,113,908.31,1298.16
c11070,0,0.0,no diff,no diff,no diff
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,1000,138070.68000000017,759,1632066.41,1770137.09
amt_liability,301,20274.89,863,0.0,20274.89
iitax_before_credits_ex_AMT,1000,-28802.79999999999,956,291018.24,262215.44
recovery_rebate_credit,0,0.0,no diff,no diff,no diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,1000,-21050.880000000005,600,240306.89,219256.01
statetax,0,0.0,no diff,no diff,no diff
payrolltax,939,17066.6,860,50776.77,67843.37
mtr_inctax,843,-19.299999999999997,280,52.3,33.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,546,-8534.540000000037,860,1450796.75,1442262.21
e02300,1,10000.0,905,0.0,10000.0
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,0,0.0,no diff,no diff,no diff
phased_out_pe,0,0.0,no diff,no diff,no diff
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,1000,-78096.15999999992,957,856997.08,778900.92
taxbc,1000,-25130.880000000005,600,242600.89,217470.01
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,7,-60.12000000000012,562,1812.92,1752.8
c11070,0,0.0,no diff,no diff,no diff
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,1000,131537.64000000013,56,1352907.13,1484444.77
amt_liability,144,13043.77,604,0.0,13043.77
iitax_before_credits_ex_AMT,1000,-21572.860000000015,916,187882.78,166309.91999999998
recovery_rebate_credit,3,1568.03,613,0.0,1568.03
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,1000,-27064.640000000014,621,363908.06,336843.42
statetax,0,0.0,no diff,no diff,no diff
payrolltax,927,17673.559999999998,359,38169.65,55843.21
mtr_inctax,502,-25.15,252,25.15,0.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,588,-8838.319999999949,359,923028.96,914190.64
e02300,0,0.0,no diff,no diff,no diff
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,0,0.0,no diff,no diff,no diff
phased_out_pe,0,0.0,no diff,no diff,no diff
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,1000,-79781.19999999995,557,863181.07,783399.87
taxbc,1000,-33750.640000000014,11,236011.88,202261.24
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,6,255.17999999999984,202,1305.4,1560.58
c11070,6,255.17999999999984,202,1305.4,1560.58
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,1000,134481.40000000014,718,1516232.63,1650714.03
amt_liability,325,20651.82,513,0.0,20651.82
iitax_before_credits_ex_AMT,1000,-30301.54999999999,557,253689.5,223387.95
recovery_rebate_credit,0,0.0,no diff,no diff,no diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,496,-3122.1300000000047,464,346693.19,343571.06
statetax,0,0.0,no diff,no diff,no diff
payrolltax,944,15766.129999999997,464,42759.4,58525.53
mtr_inctax,371,-13.869999999999997,644,41.87,28.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,563,-7884.170000000042,464,1028327.24,1020443.07
e02300,0,0.0,no diff,no diff,no diff
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,24,566.7500000000005,739,3913.52,4480.27
phased_out_pe,28,-566.75,739,12286.48,11719.73
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,560,-8221.450000000012,141,399715.05,391493.6
taxbc,984,-8184.830000000016,454,243008.07,234823.24
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,0,0.0,no diff,no diff,no diff
c11070,0,0.0,no diff,no diff,no diff
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,563,-7884.170000000042,464,1028327.24,1020443.07
amt_liability,26,233.2,644,0.0,233.2
iitax_before_credits_ex_AMT,507,-3122.1300000000047,464,346047.19,342925.06
recovery_rebate_credit,0,0.0,no diff,no diff,no diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,1000,-21050.880000000005,600,240306.89,219256.01
statetax,0,0.0,no diff,no diff,no diff
payrolltax,939,17066.6,860,50776.77,67843.37
mtr_inctax,843,-19.299999999999997,280,52.3,33.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,546,-8534.540000000037,860,1450796.75,1442262.21
e02300,1,10000.0,905,0.0,10000.0
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,0,0.0,no diff,no diff,no diff
phased_out_pe,0,0.0,no diff,no diff,no diff
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,1000,-78096.15999999992,957,856997.08,778900.92
taxbc,1000,-25130.880000000005,600,242600.89,217470.01
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,7,-60.12000000000012,562,1812.92,1752.8
c11070,0,0.0,no diff,no diff,no diff
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,1000,131537.64000000013,56,1352907.13,1484444.77
amt_liability,144,13043.77,604,0.0,13043.77
iitax_before_credits_ex_AMT,1000,-21572.860000000015,916,187882.78,166309.91999999998
recovery_rebate_credit,3,1568.03,613,0.0,1568.03
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
,# of differing records,max_diff,max_diff_index,max_diff_taxsim_val,max_diff_taxcalc_val
iitax,1000,-27064.640000000014,621,363908.06,336843.42
statetax,0,0.0,no diff,no diff,no diff
payrolltax,927,17673.559999999998,359,38169.65,55843.21
mtr_inctax,502,-25.15,252,25.15,0.0
mtr_state,0,0.0,no diff,no diff,no diff
c00100,588,-8838.319999999949,359,923028.96,914190.64
e02300,0,0.0,no diff,no diff,no diff
c02500,0,0.0,no diff,no diff,no diff
post_phase_out_pe,0,0.0,no diff,no diff,no diff
phased_out_pe,0,0.0,no diff,no diff,no diff
c21040,0,0.0,no diff,no diff,no diff
c04470,0,0.0,no diff,no diff,no diff
c04800,1000,-79781.19999999995,557,863181.07,783399.87
taxbc,1000,-33750.640000000014,11,236011.88,202261.24
exemption_surtax,0,0.0,no diff,no diff,no diff
gen_tax_credit,0,0.0,no diff,no diff,no diff
non_refundable_child_odep_credit,6,255.17999999999984,202,1305.4,1560.58
c11070,6,255.17999999999984,202,1305.4,1560.58
c07180,0,0.0,no diff,no diff,no diff
eitc,0,0.0,no diff,no diff,no diff
c62100,1000,134481.40000000014,718,1516232.63,1650714.03
amt_liability,325,20651.82,513,0.0,20651.82
iitax_before_credits_ex_AMT,1000,-30301.54999999999,557,253689.5,223387.95
recovery_rebate_credit,0,0.0,no diff,no diff,no diff
2 changes: 1 addition & 1 deletion taxcalc/validation/taxsim35/input_setup.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ def get_ftp_output(letter, year):

def change_delim(letter, year):
""" "
This function changes the delimter in the taxsim output files from
This function changes the delimeter in the taxsim output files from
a comma to a space
This is necessary because taxsim output seems to vary - for some years

0 comments on commit 39f7502

Please sign in to comment.