diff --git a/taxcalc/calcfunctions.py b/taxcalc/calcfunctions.py index 5aa06b0a4..06efcb988 100644 --- a/taxcalc/calcfunctions.py +++ b/taxcalc/calcfunctions.py @@ -249,7 +249,7 @@ def Adj(e03150, e03210, c03260, ------- c02900 : total Form 1040 adjustments, which are not included in AGI """ - # Form 2555 foreign earned income deduction is assumed to be zero + # Form 2555 foreign earned income exclusion is assumed to be zero # Form 1040 adjustments that are included in expanded income: c02900 = ((1. - ALD_StudentLoan_hc) * e03210 + c03260 + @@ -983,7 +983,7 @@ def GainsTax(e00650, c01000, c23650, p23250, e01100, e58990, e00200, dwks19 = 0. # final calculations done no matter what the value of hasqdivltcg - c05100 = c24580 # because no foreign earned income deduction + c05100 = c24580 # because foreign earned income exclusion is assumed zero c05700 = 0. # no Form 4972, Lump Sum Distributions taxbc = c05700 + c05100 return (dwks10, dwks13, dwks14, dwks19, c05700, taxbc) @@ -1102,7 +1102,7 @@ def NetInvIncTax(e00300, e00600, e02000, e26270, c01000, Computes Net Investment Income Tax (NIIT) amount assuming that all annuity income is excluded from net investment income. """ - modAGI = c00100 # no deducted foreign earned income to add + modAGI = c00100 # no foreign earned income exclusion to add if not NIIT_PT_taxed: NII = max(0., e00300 + e00600 + c01000 + e02000 - e26270) else: # do not subtract e26270 from e02000 @@ -1226,33 +1226,57 @@ def EITC(MARS, DSI, EIC, c00100, e00300, e00400, e00600, c01000, @iterate_jit(nopython=True) -def ChildDepTaxCredit(n24, MARS, c00100, exact, - CTC_c, CTC_ps, CTC_prt, prectc, nu05, - CTC_c_under5_bonus, XTOT, num, +def ChildDepTaxCredit(n24, MARS, c00100, XTOT, num, c05200, + e07260, CR_ResidentialEnergy_hc, + e07300, CR_ForeignTax_hc, + c07180, + c07230, + e07240, CR_RetirementSavings_hc, + c07200, + CTC_c, CTC_ps, CTC_prt, exact, DependentCredit_Child_c, DependentCredit_Nonchild_c, - FilerCredit_c, dep_credit): - """ - Computes pre-CTC amount (prectc) and nonrefundable dependent credit. - """ - modAGI = c00100 # no foreign earned income deduction to add to AGI - # calculate and phase-out pre-CTC amount - base_ctc = CTC_c * n24 + CTC_c_under5_bonus * nu05 - prectc = base_ctc - if prectc > 0. and modAGI > CTC_ps[MARS - 1]: - excess = modAGI - CTC_ps[MARS - 1] - if exact == 1: # exact calculation as on tax forms - excess = 1000. * math.ceil(excess / 1000.) - prectc = max(0., prectc - CTC_prt * excess) - # calculate and phase-out dependent credit after pre-CTC is phased out - dep_credit = (DependentCredit_Child_c * n24 + - DependentCredit_Nonchild_c * max(0, XTOT - n24 - num) + - FilerCredit_c[MARS - 1]) - if dep_credit > 0. and modAGI > CTC_ps[MARS - 1]: + CTC_c_under5_bonus, nu05, FilerCredit_c, + prectc, c07220): + """ + Computes amounts on "Child Tax Credit and Credit for Other Dependents + Worksheet" in 2018 Publication 972, which pretain to these two + nonrefundable tax credits. + """ + # Worksheet Part 1 + line1 = ((CTC_c + DependentCredit_Child_c) * n24 + + CTC_c_under5_bonus * nu05) + line2 = (DependentCredit_Nonchild_c * max(0, XTOT - n24 - num) + + FilerCredit_c[MARS - 1]) + line3 = line1 + line2 + modAGI = c00100 # no foreign earned income exclusion to add to AGI (line6) + if line3 > 0. and modAGI > CTC_ps[MARS - 1]: excess = modAGI - CTC_ps[MARS - 1] if exact == 1: # exact calculation as on tax forms excess = 1000. * math.ceil(excess / 1000.) - dep_credit = max(0., dep_credit - CTC_prt * excess) - return (prectc, dep_credit) + line10 = max(0., line3 - CTC_prt * excess) + else: + line10 = line3 + if line10 > 0.: + # Worksheet Part 2 + line11 = c05200 + line12 = (e07260 * (1. - CR_ResidentialEnergy_hc) + + e07300 * (1. - CR_ForeignTax_hc) + + c07180 + # child & dependent care expense credit + c07230 + # education credit + e07240 * (1. - CR_RetirementSavings_hc) + + c07200) # Schedule R credit + line13 = line11 - line12 + line14 = 0. + line15 = max(0., line13 - line14) + line16 = min(line10, line15) # credit is capped by tax liability + else: + line16 = 0. + if line1 > 0.: + prectc = line10 # post phaseout credit + else: + prectc = 0. + c07220 = line16 # combined nonrefundable CTC and ODTC amount + return (prectc, c07220) @iterate_jit(nopython=True) diff --git a/taxcalc/tests/cpscsv_agg_expect.txt b/taxcalc/tests/cpscsv_agg_expect.txt index 4784a55df..ef21981e9 100644 --- a/taxcalc/tests/cpscsv_agg_expect.txt +++ b/taxcalc/tests/cpscsv_agg_expect.txt @@ -12,12 +12,12 @@ AMT Income ($b) 7814.3 8898.7 9080.7 9412.1 10234.2 108 AMT Liability ($b) 10.6 13.4 13.8 15.6 1.3 1.4 1.4 1.4 1.4 1.4 AMT Filers (#m) 2.8 3.5 3.7 4.0 0.2 0.3 0.3 0.2 0.3 0.3 Tax before Credits ($b) 1120.1 1297.3 1330.3 1380.7 1380.7 1489.3 1594.3 1686.2 1773.7 1860.1 -Refundable Credits ($b) 67.2 68.6 68.8 68.2 79.0 78.5 78.2 78.6 79.8 80.4 -Nonrefundable Credits ($b) 26.7 27.0 27.1 27.4 90.0 92.1 93.8 95.2 96.4 97.6 +Refundable Credits ($b) 67.2 68.6 68.8 68.2 81.4 80.9 80.5 81.0 81.6 82.2 +Nonrefundable Credits ($b) 26.7 27.0 27.1 27.4 82.2 84.2 85.8 87.1 88.3 89.4 Reform Surtaxes ($b) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Other Taxes ($b) 6.7 7.8 8.0 8.1 8.6 9.6 10.4 11.2 11.8 12.5 -Ind Income Tax ($b) 1032.9 1209.5 1242.4 1293.2 1220.4 1328.3 1432.8 1523.6 1609.3 1694.6 +Ind Income Tax ($b) 1032.9 1209.5 1242.4 1293.2 1225.8 1333.8 1438.4 1529.2 1615.7 1701.0 Payroll Taxes ($b) 933.0 1069.6 1096.3 1140.9 1193.6 1260.9 1326.1 1384.6 1441.3 1498.8 -Combined Liability ($b) 1965.9 2279.0 2338.8 2434.1 2414.0 2589.2 2758.8 2908.2 3050.6 3193.3 -With Income Tax <= 0 (#m) 58.0 54.1 55.2 56.0 59.7 59.9 60.1 60.6 61.2 61.8 -With Combined Tax <= 0 (#m) 36.0 34.9 35.7 36.3 38.1 38.5 39.1 39.8 40.5 41.3 +Combined Liability ($b) 1965.9 2279.0 2338.8 2434.1 2419.4 2594.7 2764.4 2913.8 3057.0 3199.8 +With Income Tax <= 0 (#m) 58.0 54.1 55.2 56.0 58.4 58.6 58.8 59.4 60.0 60.6 +With Combined Tax <= 0 (#m) 36.0 34.9 35.7 36.3 38.1 38.6 39.2 39.8 40.5 41.3 diff --git a/taxcalc/tests/pufcsv_agg_expect.txt b/taxcalc/tests/pufcsv_agg_expect.txt index 523c29808..e3d3f650f 100644 --- a/taxcalc/tests/pufcsv_agg_expect.txt +++ b/taxcalc/tests/pufcsv_agg_expect.txt @@ -12,12 +12,12 @@ AMT Income ($b) 8771.5 9427.3 9882.8 10021.5 10515.6 114 AMT Liability ($b) 38.5 41.0 43.9 45.7 47.5 23.6 25.1 26.6 27.8 28.9 AMT Filers (#m) 4.1 4.5 4.8 4.9 5.2 0.8 0.8 0.8 0.8 0.8 Tax before Credits ($b) 1340.3 1498.7 1580.6 1600.3 1699.8 1712.9 1829.5 1905.2 1974.4 2049.6 -Refundable Credits ($b) 105.6 104.0 104.3 104.4 105.0 120.2 121.2 122.0 123.7 126.5 -Nonrefundable Credits ($b) 67.0 66.9 67.4 67.2 68.4 127.2 130.1 131.7 132.9 134.5 +Refundable Credits ($b) 105.6 104.0 104.3 104.4 105.0 124.0 124.9 125.8 127.6 129.5 +Nonrefundable Credits ($b) 67.0 66.9 67.4 67.2 68.4 121.4 124.3 125.8 127.0 128.6 Reform Surtaxes ($b) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Other Taxes ($b) 26.2 33.9 35.5 33.1 39.4 44.2 46.9 46.7 47.1 48.0 -Ind Income Tax ($b) 1194.0 1361.6 1444.4 1461.7 1565.8 1509.7 1625.1 1698.3 1765.0 1836.6 +Ind Income Tax ($b) 1194.0 1361.6 1444.4 1461.7 1565.8 1511.7 1627.2 1700.3 1767.0 1839.6 Payroll Taxes ($b) 947.8 982.0 1026.6 1050.9 1094.3 1144.8 1207.7 1268.5 1322.9 1376.3 -Combined Liability ($b) 2141.9 2343.6 2470.9 2512.6 2660.0 2654.5 2832.8 2966.8 3087.9 3212.8 -With Income Tax <= 0 (#m) 68.9 68.4 68.3 69.4 70.1 76.9 76.9 77.1 77.5 78.0 -With Combined Tax <= 0 (#m) 39.5 39.8 39.9 40.6 41.3 43.3 43.6 44.0 44.4 45.0 +Combined Liability ($b) 2141.9 2343.6 2470.9 2512.6 2660.0 2656.6 2834.9 2968.8 3089.9 3215.9 +With Income Tax <= 0 (#m) 68.9 68.4 68.3 69.4 70.1 76.4 76.4 76.6 77.0 77.5 +With Combined Tax <= 0 (#m) 39.5 39.8 39.9 40.6 41.3 43.5 43.8 44.2 44.6 45.1 diff --git a/taxcalc/tests/reforms_expect.csv b/taxcalc/tests/reforms_expect.csv index e766d649b..c9fd90f9a 100644 --- a/taxcalc/tests/reforms_expect.csv +++ b/taxcalc/tests/reforms_expect.csv @@ -54,9 +54,9 @@ rid,res1,res2,res3,res4 53,-107.5,-109.0,-112.3,-115.9 54,28.7,31.2,33.0,32.3 55,85.4,89.8,95.8,101.9 -56,-8.8,-8.5,-8.2,-8.0 -57,-13.9,-13.6,-13.3,-13.1 -58,0.0,-30.3,-33.2,-38.2 +56,-22.2,-22.3,-22.4,-22.4 +57,-22.2,-22.3,-22.4,-22.4 +58,0.0,-32.6,-35.6,-40.5 59,-14.5,-16.0,-16.6,-16.1 60,-16.0,-17.6,-18.3,-17.8 61,-64.6,-65.0,-65.4,-65.6 diff --git a/taxcalc/tests/tbi_cps_expect.txt b/taxcalc/tests/tbi_cps_expect.txt index 5796d7c4b..269b9015b 100644 --- a/taxcalc/tests/tbi_cps_expect.txt +++ b/taxcalc/tests/tbi_cps_expect.txt @@ -1,13 +1,13 @@ TABLE aggr_1 RESULTS: { - "combined_tax_2": "2769.98", - "ind_tax_2": "1441.86", + "combined_tax_2": "2776.30", + "ind_tax_2": "1448.18", "payroll_tax_2": "1328.12" } TABLE aggr_2 RESULTS: { - "combined_tax_2": "3061.50", - "ind_tax_2": "1733.39", + "combined_tax_2": "3067.82", + "ind_tax_2": "1739.71", "payroll_tax_2": "1328.12" } TABLE aggr_d RESULTS: @@ -1336,17 +1336,17 @@ TABLE dist1_xbin RESULTS: "0.02", "0.00", "0.76", - "0.09", + "0.04", "0.00", - "4.48", - "-3.82", + "4.57", + "-3.84", "10.70", - "6.88", + "6.86", "0.00", "32.18", "32.18", "110.47", - "103.59" + "103.62" ], "$100-200K_2": [ "36.28", @@ -1362,17 +1362,17 @@ TABLE dist1_xbin RESULTS: "0.02", "0.01", "416.17", - "36.45", + "33.67", "0.00", - "7.40", - "372.31", + "7.53", + "374.97", "449.48", - "821.79", + "824.45", "0.00", "1021.03", "1021.03", "4962.29", - "4140.50" + "4137.84" ], "$20-30K_2": [ "14.42", @@ -1388,17 +1388,17 @@ TABLE dist1_xbin RESULTS: "0.00", "0.00", "7.43", - "0.79", + "0.46", "0.00", - "7.18", - "-0.53", + "7.52", + "-0.55", "32.80", - "32.27", + "32.25", "0.00", "128.15", "128.15", "367.55", - "335.28" + "335.30" ], "$200-500K_2": [ "13.46", @@ -1414,17 +1414,17 @@ TABLE dist1_xbin RESULTS: "0.13", "0.51", "531.76", - "14.85", + "14.02", "1.89", "0.10", - "518.70", + "519.52", "330.18", - "848.88", + "849.71", "0.00", "299.29", "299.29", "3764.57", - "2915.69" + "2914.86" ], "$30-40K_2": [ "18.37", @@ -1440,17 +1440,17 @@ TABLE dist1_xbin RESULTS: "0.01", "0.02", "16.41", - "2.66", + "2.07", "0.00", - "10.24", - "3.52", + "10.70", + "3.64", "49.34", - "52.86", + "52.98", "0.00", "278.17", "278.17", "641.25", - "588.39" + "588.27" ], "$40-50K_2": [ "17.60", @@ -1466,17 +1466,17 @@ TABLE dist1_xbin RESULTS: "0.02", "0.03", "29.53", - "5.20", + "4.22", "0.00", - "11.95", - "12.39", + "12.14", + "13.17", "72.83", - "85.22", + "86.00", "0.00", "245.25", "245.25", "789.09", - "703.88" + "703.09" ], "$50-75K_2": [ "31.74", @@ -1492,17 +1492,17 @@ TABLE dist1_xbin RESULTS: "0.00", "0.00", "82.24", - "15.28", + "13.49", "0.00", - "22.83", - "44.13", + "23.61", + "45.14", "163.10", - "207.23", + "208.24", "0.00", "683.90", "683.90", "1955.07", - "1747.84" + "1746.82" ], "$500-1000K_2": [ "1.05", @@ -1518,17 +1518,17 @@ TABLE dist1_xbin RESULTS: "0.01", "0.07", "153.99", - "0.03", + "0.04", "1.93", "0.00", - "155.89", + "155.88", "35.86", - "191.75", + "191.73", "0.00", "19.51", "19.51", "709.02", - "517.27" + "517.29" ], "$75-100K_2": [ "20.36", @@ -1544,17 +1544,17 @@ TABLE dist1_xbin RESULTS: "0.02", "0.11", "101.59", - "14.79", + "13.50", "0.00", - "12.44", - "74.36", + "12.76", + "75.34", "153.07", - "227.43", + "228.41", "0.00", "531.13", "531.13", "1762.26", - "1534.83" + "1533.85" ], "<$0K_2": [ "0.04", @@ -1648,17 +1648,17 @@ TABLE dist1_xbin RESULTS: "0.26", "1.17", "1598.75", - "90.14", + "81.52", "10.39", - "77.14", - "1441.86", + "79.44", + "1448.18", "1328.12", - "2769.98", + "2776.30", "0.00", "3253.20", "3253.20", "15954.52", - "13184.54" + "13178.22" ] } TABLE dist1_xdec RESULTS: @@ -1703,17 +1703,17 @@ TABLE dist1_xdec RESULTS: "0.02", "0.00", "1.92", - "0.16", + "0.05", "0.00", - "6.12", - "-4.37", + "6.24", + "-4.38", "19.52", - "15.15", + "15.14", "0.00", "55.02", "55.02", "199.31", - "184.16" + "184.17" ], "0-10z_2": [ "0.77", @@ -1755,9 +1755,9 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "9.62", - "1.20", + "0.79", "0.00", - "8.79", + "9.20", "-0.37", "37.16", "36.79", @@ -1781,17 +1781,17 @@ TABLE dist1_xdec RESULTS: "0.03", "0.04", "18.07", - "2.87", + "2.21", "0.00", - "9.51", - "5.70", + "9.92", + "5.95", "51.66", - "57.36", + "57.60", "0.00", "240.01", "240.01", "621.33", - "563.98" + "563.73" ], "30-40_2": [ "16.82", @@ -1807,17 +1807,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "30.31", - "5.56", + "4.60", "0.00", - "11.55", - "13.20", + "11.73", + "13.98", "71.75", - "84.96", + "85.74", "0.00", "247.53", "247.53", "785.85", - "700.89" + "700.11" ], "40-50_2": [ "16.70", @@ -1833,17 +1833,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "39.18", - "7.52", + "6.87", "0.00", - "11.98", - "19.68", + "12.47", + "19.83", "82.37", - "102.05", + "102.20", "0.00", "330.40", "330.40", "964.14", - "862.09" + "861.94" ], "50-60_2": [ "16.81", @@ -1859,17 +1859,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "56.87", - "9.21", + "8.01", "0.00", - "11.57", - "36.09", + "11.86", + "37.00", "99.98", - "136.07", + "136.99", "0.00", "411.71", "411.71", "1201.66", - "1065.59" + "1064.68" ], "60-70_2": [ "16.75", @@ -1885,17 +1885,17 @@ TABLE dist1_xdec RESULTS: "0.02", "0.11", "87.35", - "12.72", + "11.56", "0.00", - "10.30", - "64.34", + "10.59", + "65.20", "127.96", - "192.29", + "193.16", "0.00", "457.62", "457.62", "1502.74", - "1310.45" + "1309.59" ], "70-80_2": [ "16.76", @@ -1911,17 +1911,17 @@ TABLE dist1_xdec RESULTS: "0.01", "0.00", "133.21", - "14.73", + "13.54", "0.00", - "6.25", - "112.22", + "6.35", + "113.32", "169.04", - "281.27", + "282.37", "0.00", "480.62", "480.62", "1909.54", - "1628.28" + "1627.18" ], "80-90_2": [ "16.74", @@ -1937,17 +1937,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "238.51", - "19.36", + "18.14", "0.00", - "0.90", - "218.24", + "0.92", + "219.45", "241.94", - "460.18", + "461.39", "0.00", "444.70", "444.70", "2599.29", - "2139.10" + "2137.89" ], "90-100_2": [ "16.77", @@ -1963,17 +1963,17 @@ TABLE dist1_xdec RESULTS: "0.18", "1.01", "983.72", - "16.81", + "15.74", "10.39", "0.16", - "977.14", + "978.20", "426.71", - "1403.85", + "1404.91", "0.00", "385.33", "385.33", "5704.43", - "4300.58" + "4299.52" ], "90-95_2": [ "8.37", @@ -1989,17 +1989,17 @@ TABLE dist1_xdec RESULTS: "0.02", "0.04", "223.43", - "9.05", + "8.31", "0.05", "0.07", - "214.36", + "215.10", "173.82", - "388.18", + "388.91", "0.00", "206.97", "206.97", "1833.32", - "1445.14" + "1444.41" ], "95-99_2": [ "6.72", @@ -2015,17 +2015,17 @@ TABLE dist1_xdec RESULTS: "0.11", "0.46", "327.90", - "7.67", + "7.28", "1.64", "0.09", - "321.78", + "322.17", "181.53", - "503.32", + "503.71", "0.00", "148.88", "148.88", "2180.18", - "1676.86" + "1676.47" ], "ALL_2": [ "167.51", @@ -2041,17 +2041,17 @@ TABLE dist1_xdec RESULTS: "0.26", "1.17", "1598.75", - "90.14", + "81.52", "10.39", - "77.14", - "1441.86", + "79.44", + "1448.18", "1328.12", - "2769.98", + "2776.30", "0.00", "3253.20", "3253.20", "15954.52", - "13184.54" + "13178.22" ], "Top 1%_2": [ "1.68", @@ -2067,17 +2067,17 @@ TABLE dist1_xdec RESULTS: "0.05", "0.51", "432.39", - "0.09", + "0.15", "8.69", "0.00", - "440.99", + "440.93", "71.36", - "512.35", + "512.29", "0.00", "29.49", "29.49", "1690.93", - "1178.58" + "1178.64" ] } TABLE dist2_xbin RESULTS: @@ -2122,17 +2122,17 @@ TABLE dist2_xbin RESULTS: "0.02", "0.00", "0.76", - "0.09", + "0.04", "0.00", - "4.48", - "-3.82", + "4.57", + "-3.84", "10.70", - "6.88", + "6.86", "0.00", "32.18", "32.18", "110.47", - "103.59" + "103.62" ], "$100-200K_2": [ "36.28", @@ -2148,17 +2148,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "500.43", - "36.45", + "33.67", "0.00", - "7.40", - "456.57", + "7.53", + "459.23", "449.48", - "906.05", + "908.71", "0.00", "1021.03", "1021.03", "4962.29", - "4056.24" + "4053.58" ], "$20-30K_2": [ "14.42", @@ -2174,17 +2174,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "7.43", - "0.79", + "0.46", "0.00", - "7.18", - "-0.53", + "7.52", + "-0.55", "32.80", - "32.27", + "32.25", "0.00", "128.15", "128.15", "367.55", - "335.28" + "335.30" ], "$200-500K_2": [ "13.46", @@ -2200,17 +2200,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "694.44", - "14.85", + "14.02", "1.89", "0.10", - "681.38", + "682.21", "330.18", - "1011.56", + "1012.39", "0.00", "299.29", "299.29", "3764.57", - "2753.00" + "2752.18" ], "$30-40K_2": [ "18.37", @@ -2226,17 +2226,17 @@ TABLE dist2_xbin RESULTS: "0.01", "0.02", "16.41", - "2.66", + "2.07", "0.00", - "10.24", - "3.52", + "10.70", + "3.64", "49.34", - "52.86", + "52.98", "0.00", "278.17", "278.17", "641.25", - "588.39" + "588.27" ], "$40-50K_2": [ "17.60", @@ -2252,17 +2252,17 @@ TABLE dist2_xbin RESULTS: "0.02", "0.03", "29.53", - "5.20", + "4.22", "0.00", - "11.95", - "12.39", + "12.14", + "13.17", "72.83", - "85.22", + "86.00", "0.00", "245.25", "245.25", "789.09", - "703.88" + "703.09" ], "$50-75K_2": [ "31.74", @@ -2278,17 +2278,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "85.43", - "15.29", + "13.50", "0.00", - "22.82", - "47.32", + "23.60", + "48.33", "163.10", - "210.42", + "211.44", "0.00", "683.90", "683.90", "1955.07", - "1744.64" + "1743.63" ], "$500-1000K_2": [ "1.05", @@ -2304,17 +2304,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.01", "174.66", - "0.03", + "0.04", "1.93", "0.00", - "176.57", + "176.56", "35.86", - "212.43", + "212.41", "0.00", "19.51", "19.51", "709.02", - "496.59" + "496.61" ], "$75-100K_2": [ "20.36", @@ -2330,17 +2330,17 @@ TABLE dist2_xbin RESULTS: "0.02", "0.03", "115.22", - "14.79", + "13.50", "0.00", - "12.44", - "87.99", + "12.76", + "88.97", "153.07", - "241.06", + "242.04", "0.00", "531.13", "531.13", "1762.26", - "1521.20" + "1520.22" ], "<$0K_2": [ "0.04", @@ -2434,17 +2434,17 @@ TABLE dist2_xbin RESULTS: "0.09", "0.24", "1890.28", - "90.15", + "81.53", "10.39", - "77.13", - "1733.39", + "79.43", + "1739.71", "1328.12", - "3061.50", + "3067.82", "0.00", "3253.20", "3253.20", "15954.52", - "12893.02" + "12886.70" ] } TABLE dist2_xdec RESULTS: @@ -2489,17 +2489,17 @@ TABLE dist2_xdec RESULTS: "0.02", "0.00", "1.92", - "0.16", + "0.05", "0.00", - "6.12", - "-4.37", + "6.24", + "-4.38", "19.52", - "15.15", + "15.14", "0.00", "-110.05", "-110.05", "199.31", - "184.16" + "184.17" ], "0-10z_2": [ "0.77", @@ -2541,9 +2541,9 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "9.62", - "1.20", + "0.79", "0.00", - "8.79", + "9.20", "-0.37", "37.16", "36.79", @@ -2567,17 +2567,17 @@ TABLE dist2_xdec RESULTS: "0.03", "0.04", "18.07", - "2.87", + "2.21", "0.00", - "9.51", - "5.70", + "9.92", + "5.95", "51.66", - "57.36", + "57.60", "0.00", "-480.02", "-480.02", "621.33", - "563.98" + "563.73" ], "30-40_2": [ "16.82", @@ -2593,17 +2593,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "30.31", - "5.56", + "4.60", "0.00", - "11.55", - "13.20", + "11.73", + "13.98", "71.75", - "84.96", + "85.74", "0.00", "-495.06", "-495.06", "785.85", - "700.89" + "700.11" ], "40-50_2": [ "16.70", @@ -2619,17 +2619,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "39.79", - "7.53", + "6.88", "0.00", - "11.97", - "20.29", + "12.46", + "20.44", "82.37", - "102.66", + "102.81", "0.00", "-660.80", "-660.80", "964.14", - "861.48" + "861.33" ], "50-60_2": [ "16.81", @@ -2645,17 +2645,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "61.85", - "9.21", + "8.01", "0.00", - "11.57", - "41.07", + "11.86", + "41.99", "99.98", - "141.06", + "141.97", "0.00", "-823.41", "-823.41", "1201.66", - "1060.61" + "1059.69" ], "60-70_2": [ "16.75", @@ -2671,17 +2671,17 @@ TABLE dist2_xdec RESULTS: "0.02", "0.03", "99.51", - "12.72", + "11.56", "0.00", - "10.30", - "76.49", + "10.59", + "77.36", "127.96", - "204.45", + "205.31", "0.00", "-915.23", "-915.23", "1502.74", - "1298.29" + "1297.43" ], "70-80_2": [ "16.76", @@ -2697,17 +2697,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "154.04", - "14.73", + "13.54", "0.00", - "6.25", - "133.06", + "6.35", + "134.16", "169.04", - "302.10", + "303.20", "0.00", "-961.23", "-961.23", "1909.54", - "1607.44" + "1606.34" ], "80-90_2": [ "16.74", @@ -2723,17 +2723,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "289.93", - "19.36", + "18.14", "0.00", - "0.90", - "269.67", + "0.92", + "270.88", "241.94", - "511.61", + "512.82", "0.00", "-889.41", "-889.41", "2599.29", - "2087.68" + "2086.47" ], "90-100_2": [ "16.77", @@ -2749,17 +2749,17 @@ TABLE dist2_xdec RESULTS: "0.02", "0.17", "1185.23", - "16.81", + "15.74", "10.39", "0.16", - "1178.65", + "1179.72", "426.71", - "1605.37", + "1606.43", "0.00", "-770.66", "-770.66", "5704.43", - "4099.07" + "4098.01" ], "90-95_2": [ "8.37", @@ -2775,17 +2775,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "291.56", - "9.05", + "8.31", "0.05", "0.07", - "282.49", + "283.23", "173.82", - "456.31", + "457.05", "0.00", "-413.94", "-413.94", "1833.32", - "1377.01" + "1376.28" ], "95-99_2": [ "6.72", @@ -2801,17 +2801,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "429.41", - "7.67", + "7.28", "1.64", "0.09", - "423.29", + "423.68", "181.53", - "604.83", + "605.22", "0.00", "-297.76", "-297.76", "2180.18", - "1575.35" + "1574.96" ], "ALL_2": [ "167.51", @@ -2827,17 +2827,17 @@ TABLE dist2_xdec RESULTS: "0.09", "0.24", "1890.28", - "90.15", + "81.53", "10.39", - "77.13", - "1733.39", + "79.43", + "1739.71", "1328.12", - "3061.50", + "3067.82", "0.00", "-6506.40", "-6506.40", "15954.52", - "12893.02" + "12886.70" ], "Top 1%_2": [ "1.68", @@ -2853,16 +2853,16 @@ TABLE dist2_xdec RESULTS: "0.02", "0.17", "464.26", - "0.09", + "0.15", "8.69", "0.00", - "472.87", + "472.81", "71.36", - "544.23", + "544.17", "0.00", "-58.97", "-58.97", "1690.93", - "1146.70" + "1146.77" ] } diff --git a/taxcalc/tests/tbi_puf_expect.txt b/taxcalc/tests/tbi_puf_expect.txt index d7a0e3f31..3ac260f48 100644 --- a/taxcalc/tests/tbi_puf_expect.txt +++ b/taxcalc/tests/tbi_puf_expect.txt @@ -1,13 +1,13 @@ TABLE aggr_1 RESULTS: { - "combined_tax_2": "2954.86", - "ind_tax_2": "1696.11", + "combined_tax_2": "2956.75", + "ind_tax_2": "1697.99", "payroll_tax_2": "1258.76" } TABLE aggr_2 RESULTS: { - "combined_tax_2": "3237.16", - "ind_tax_2": "1978.40", + "combined_tax_2": "3239.05", + "ind_tax_2": "1980.29", "payroll_tax_2": "1258.76" } TABLE aggr_d RESULTS: @@ -1336,17 +1336,17 @@ TABLE dist1_xbin RESULTS: "0.02", "0.01", "1.97", - "0.48", + "0.45", "0.05", - "35.47", - "-33.93", + "36.19", + "-34.62", "31.83", - "-2.11", + "-2.79", "0.00", "96.37", "96.37", "333.64", - "335.75" + "336.43" ], "$100-200K_2": [ "27.88", @@ -1362,17 +1362,17 @@ TABLE dist1_xbin RESULTS: "0.04", "0.26", "403.25", - "39.88", + "38.11", "3.29", "2.68", - "363.99", + "365.76", "419.01", - "783.00", + "784.77", "0.00", "196.10", "196.10", "3898.09", - "3115.09" + "3113.32" ], "$20-30K_2": [ "19.47", @@ -1388,17 +1388,17 @@ TABLE dist1_xbin RESULTS: "0.00", "0.01", "7.94", - "2.72", + "2.50", "0.11", - "33.03", - "-27.70", + "34.27", + "-28.72", "41.55", - "13.85", + "12.83", "0.00", "146.47", "146.47", "478.68", - "464.83" + "465.85" ], "$200-500K_2": [ "10.32", @@ -1414,17 +1414,17 @@ TABLE dist1_xbin RESULTS: "0.33", "2.53", "444.04", - "17.30", + "16.73", "6.07", "0.02", - "432.79", + "433.37", "265.17", - "697.96", + "698.54", "0.00", "44.18", "44.18", "2990.29", - "2292.33" + "2291.75" ], "$30-40K_2": [ "15.90", @@ -1440,17 +1440,17 @@ TABLE dist1_xbin RESULTS: "0.05", "0.04", "17.45", - "6.18", + "5.82", "0.38", - "21.64", - "-9.99", + "22.74", + "-10.73", "51.53", - "41.54", + "40.79", "0.00", "124.02", "124.02", "550.16", - "508.63" + "509.37" ], "$40-50K_2": [ "13.73", @@ -1466,17 +1466,17 @@ TABLE dist1_xbin RESULTS: "0.00", "0.00", "27.00", - "7.11", + "6.52", "0.60", - "8.69", - "11.80", + "9.00", + "12.08", "56.59", - "68.39", + "68.67", "0.00", "118.39", "118.39", "617.74", - "549.35" + "549.07" ], "$50-75K_2": [ "23.78", @@ -1492,17 +1492,17 @@ TABLE dist1_xbin RESULTS: "0.00", "0.00", "89.46", - "19.52", + "18.22", "0.87", - "8.20", - "62.61", + "8.41", + "63.71", "143.25", - "205.87", + "206.96", "0.00", "181.38", "181.38", "1456.13", - "1250.26" + "1249.17" ], "$500-1000K_2": [ "1.65", @@ -1518,17 +1518,17 @@ TABLE dist1_xbin RESULTS: "0.16", "1.44", "226.63", - "5.26", + "5.27", "6.83", "0.00", - "228.21", + "228.19", "52.78", - "280.98", + "280.97", "0.00", "12.38", "12.38", "1162.04", - "881.06" + "881.08" ], "$75-100K_2": [ "15.93", @@ -1544,17 +1544,17 @@ TABLE dist1_xbin RESULTS: "0.00", "0.00", "112.10", - "15.81", + "15.10", "0.81", - "1.86", - "95.23", + "1.88", + "95.92", "142.25", - "237.48", + "238.17", "0.00", "131.40", "131.40", "1381.53", - "1144.05" + "1143.36" ], "<$0K_2": [ "0.86", @@ -1570,17 +1570,17 @@ TABLE dist1_xbin RESULTS: "0.01", "0.19", "4.50", - "0.20", + "0.18", "0.24", - "0.10", - "4.45", + "0.12", + "4.44", "2.29", - "6.75", + "6.73", "0.00", "4.04", "4.04", "-140.63", - "-147.38" + "-147.36" ], "=$0K_2": [ "3.46", @@ -1598,15 +1598,15 @@ TABLE dist1_xbin RESULTS: "0.00", "0.00", "0.00", - "0.42", - "-0.42", + "0.47", + "-0.47", "0.73", - "0.31", + "0.27", "0.00", "0.00", "0.00", "0.00", - "-0.31" + "-0.27" ], ">$1000K_2": [ "0.80", @@ -1622,7 +1622,7 @@ TABLE dist1_xbin RESULTS: "0.12", "15.73", "561.61", - "11.92", + "11.91", "26.18", "0.00", "575.87", @@ -1632,7 +1632,7 @@ TABLE dist1_xbin RESULTS: "6.21", "6.21", "2162.49", - "1546.02" + "1546.01" ], "ALL_2": [ "177.52", @@ -1648,17 +1648,17 @@ TABLE dist1_xbin RESULTS: "0.72", "20.24", "1896.31", - "126.45", + "120.89", "45.48", - "119.23", - "1696.11", + "122.91", + "1697.99", "1258.76", - "2954.86", + "2956.75", "0.00", "1082.59", "1082.59", "14992.94", - "12038.08" + "12036.19" ] } TABLE dist1_xdec RESULTS: @@ -1677,17 +1677,17 @@ TABLE dist1_xdec RESULTS: "0.01", "0.19", "4.50", - "0.20", + "0.18", "0.24", - "0.10", - "4.45", + "0.12", + "4.44", "2.29", - "6.75", + "6.73", "0.00", "4.04", "4.04", "-140.63", - "-147.37" + "-147.36" ], "0-10p_2": [ "13.46", @@ -1731,15 +1731,15 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "0.00", - "0.42", - "-0.42", + "0.47", + "-0.47", "0.73", - "0.31", + "0.27", "0.00", "0.00", "0.00", "-0.00", - "-0.31" + "-0.27" ], "10-20_2": [ "17.76", @@ -1757,15 +1757,15 @@ TABLE dist1_xdec RESULTS: "0.28", "0.07", "0.03", - "16.29", - "-16.05", + "16.36", + "-16.12", "17.26", - "1.21", + "1.14", "0.00", "52.19", "52.19", "180.70", - "179.50" + "179.57" ], "20-30_2": [ "17.76", @@ -1781,17 +1781,17 @@ TABLE dist1_xdec RESULTS: "0.02", "0.01", "3.07", - "0.91", + "0.84", "0.06", - "33.90", - "-31.67", + "34.88", + "-32.59", "31.14", - "-0.53", + "-1.45", "0.00", "93.78", "93.78", "327.17", - "327.70" + "328.62" ], "30-40_2": [ "17.75", @@ -1807,17 +1807,17 @@ TABLE dist1_xdec RESULTS: "0.05", "0.04", "10.38", - "3.54", + "3.29", "0.20", - "28.24", - "-21.20", + "29.43", + "-22.13", "43.22", - "22.02", + "21.09", "0.00", "127.28", "127.28", "476.31", - "454.29" + "455.22" ], "40-50_2": [ "17.73", @@ -1833,17 +1833,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "23.38", - "7.35", + "6.92", "0.34", - "19.72", - "-3.35", + "20.64", + "-3.84", "61.29", - "57.94", + "57.45", "0.00", "149.41", "149.41", "665.75", - "607.80" + "608.29" ], "50-60_2": [ "17.77", @@ -1859,17 +1859,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "43.75", - "12.84", + "11.89", "0.80", - "9.47", - "22.25", + "9.82", + "22.85", "85.09", - "107.33", + "107.94", "0.00", "147.37", "147.37", "898.01", - "790.68" + "790.08" ], "60-70_2": [ "17.72", @@ -1885,17 +1885,17 @@ TABLE dist1_xdec RESULTS: "0.00", "0.00", "81.24", - "14.30", + "13.35", "0.69", - "4.03", - "63.60", + "4.11", + "64.47", "118.27", - "181.87", + "182.74", "0.00", "140.91", "140.91", "1207.32", - "1025.45" + "1024.58" ], "70-80_2": [ "17.78", @@ -1911,17 +1911,17 @@ TABLE dist1_xdec RESULTS: "0.01", "0.00", "140.10", - "18.60", + "17.76", "0.89", - "2.01", - "120.38", + "2.04", + "121.20", "173.38", - "293.77", + "294.58", "0.00", "140.66", "140.66", "1670.66", - "1376.89" + "1376.07" ], "80-90_2": [ "17.75", @@ -1937,17 +1937,17 @@ TABLE dist1_xdec RESULTS: "0.02", "0.11", "248.91", - "25.73", + "24.72", "2.31", "1.63", - "223.87", + "224.88", "266.59", - "490.46", + "491.48", "0.00", "123.76", "123.76", "2438.05", - "1947.59" + "1946.58" ], "90-100_2": [ "17.76", @@ -1963,17 +1963,17 @@ TABLE dist1_xdec RESULTS: "0.63", "19.86", "1340.57", - "42.92", + "41.87", "39.88", "0.52", - "1337.02", + "1338.07", "455.12", - "1792.14", + "1793.20", "0.00", "96.57", "96.57", "7231.85", - "5439.71" + "5438.66" ], "90-95_2": [ "8.87", @@ -1989,17 +1989,17 @@ TABLE dist1_xdec RESULTS: "0.03", "0.18", "216.03", - "14.59", + "13.74", "1.35", "0.51", - "202.28", + "203.13", "185.61", - "387.89", + "388.74", "0.00", "48.93", "48.93", "1772.06", - "1384.17" + "1383.32" ], "95-99_2": [ "7.10", @@ -2015,17 +2015,17 @@ TABLE dist1_xdec RESULTS: "0.40", "3.06", "406.43", - "13.46", + "13.27", "7.58", "0.01", - "400.54", + "400.73", "196.17", - "596.70", + "596.89", "0.00", "32.76", "32.76", "2516.12", - "1919.41" + "1919.22" ], "ALL_2": [ "177.52", @@ -2041,17 +2041,17 @@ TABLE dist1_xdec RESULTS: "0.72", "20.24", "1896.31", - "126.45", + "120.89", "45.48", - "119.23", - "1696.11", + "122.91", + "1697.99", "1258.76", - "2954.86", + "2956.75", "0.00", "1082.59", "1082.59", "14992.94", - "12038.08" + "12036.19" ], "Top 1%_2": [ "1.78", @@ -2067,17 +2067,17 @@ TABLE dist1_xdec RESULTS: "0.20", "16.63", "718.11", - "14.86", + "14.85", "30.96", "0.00", - "734.20", + "734.21", "73.35", - "807.55", + "807.56", "0.00", "14.87", "14.87", "2943.67", - "2136.13" + "2136.11" ] } TABLE dist2_xbin RESULTS: @@ -2122,17 +2122,17 @@ TABLE dist2_xbin RESULTS: "0.02", "0.01", "1.97", - "0.48", + "0.45", "0.05", - "35.47", - "-33.93", + "36.19", + "-34.62", "31.83", - "-2.11", + "-2.79", "0.00", "96.37", "96.37", "333.64", - "335.75" + "336.43" ], "$100-200K_2": [ "27.88", @@ -2148,17 +2148,17 @@ TABLE dist2_xbin RESULTS: "0.01", "0.19", "491.05", - "39.88", + "38.11", "3.29", "2.68", - "451.79", + "453.56", "419.01", - "870.80", + "872.57", "0.00", "196.10", "196.10", "3898.09", - "3027.29" + "3025.52" ], "$20-30K_2": [ "19.47", @@ -2174,17 +2174,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "7.94", - "2.72", + "2.50", "0.11", - "33.03", - "-27.70", + "34.27", + "-28.72", "41.55", - "13.85", + "12.83", "0.00", "146.47", "146.47", "478.68", - "464.83" + "465.85" ], "$200-500K_2": [ "10.32", @@ -2200,17 +2200,17 @@ TABLE dist2_xbin RESULTS: "0.03", "0.68", "573.07", - "17.30", + "16.73", "6.07", "0.02", - "561.82", + "562.39", "265.17", - "826.99", + "827.56", "0.00", "44.18", "44.18", "2990.29", - "2163.30" + "2162.72" ], "$30-40K_2": [ "15.90", @@ -2226,17 +2226,17 @@ TABLE dist2_xbin RESULTS: "0.05", "0.04", "17.45", - "6.18", + "5.82", "0.38", - "21.64", - "-9.99", + "22.74", + "-10.73", "51.53", - "41.54", + "40.79", "0.00", "124.02", "124.02", "550.16", - "508.63" + "509.37" ], "$40-50K_2": [ "13.73", @@ -2252,17 +2252,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "27.00", - "7.11", + "6.52", "0.60", - "8.69", - "11.80", + "9.00", + "12.08", "56.59", - "68.39", + "68.67", "0.00", "118.39", "118.39", "617.74", - "549.35" + "549.07" ], "$50-75K_2": [ "23.78", @@ -2278,17 +2278,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "93.49", - "19.52", + "18.22", "0.87", - "8.20", - "66.64", + "8.41", + "67.74", "143.25", - "209.90", + "210.99", "0.00", "181.38", "181.38", "1456.13", - "1246.23" + "1245.14" ], "$500-1000K_2": [ "1.65", @@ -2304,17 +2304,17 @@ TABLE dist2_xbin RESULTS: "0.03", "0.68", "257.01", - "5.26", + "5.27", "6.83", "0.00", - "258.59", + "258.57", "52.78", - "311.37", + "311.35", "0.00", "12.38", "12.38", "1162.04", - "850.68" + "850.70" ], "$75-100K_2": [ "15.93", @@ -2330,17 +2330,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "126.98", - "15.81", + "15.10", "0.81", - "1.86", - "110.11", + "1.88", + "110.80", "142.25", - "252.36", + "253.05", "0.00", "131.40", "131.40", "1381.53", - "1129.17" + "1128.48" ], "<$0K_2": [ "0.86", @@ -2356,17 +2356,17 @@ TABLE dist2_xbin RESULTS: "0.00", "0.19", "5.02", - "0.20", + "0.18", "0.24", - "0.10", - "4.97", + "0.12", + "4.96", "2.29", - "7.27", + "7.25", "0.00", "4.04", "4.04", "-140.63", - "-147.89" + "-147.88" ], "=$0K_2": [ "3.46", @@ -2384,15 +2384,15 @@ TABLE dist2_xbin RESULTS: "0.00", "0.00", "0.00", - "0.42", - "-0.42", + "0.47", + "-0.47", "0.73", - "0.31", + "0.27", "0.00", "0.00", "0.00", "0.00", - "-0.31" + "-0.27" ], ">$1000K_2": [ "0.80", @@ -2408,12 +2408,12 @@ TABLE dist2_xbin RESULTS: "0.07", "14.73", "575.98", - "11.93", + "11.92", "26.18", "0.00", "590.24", "40.61", - "630.84", + "630.85", "0.00", "6.21", "6.21", @@ -2434,17 +2434,17 @@ TABLE dist2_xbin RESULTS: "0.20", "16.52", "2177.32", - "126.46", + "120.90", "45.48", - "119.23", - "1977.11", + "122.91", + "1978.99", "1258.76", - "3235.86", + "3237.75", "0.00", "1082.59", "1082.59", "14992.94", - "11757.08" + "11755.19" ] } TABLE dist2_xdec RESULTS: @@ -2463,17 +2463,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.19", "4.99", - "0.20", + "0.18", "0.24", - "0.10", - "4.94", + "0.12", + "4.93", "2.29", - "7.24", + "7.22", "0.00", "4.04", "4.04", "-140.63", - "-147.87" + "-147.85" ], "0-10p_2": [ "13.46", @@ -2517,15 +2517,15 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "0.00", - "0.42", - "-0.42", + "0.47", + "-0.47", "0.73", - "0.31", + "0.27", "0.00", "0.00", "0.00", "-0.00", - "-0.31" + "-0.27" ], "10-20_2": [ "17.76", @@ -2543,15 +2543,15 @@ TABLE dist2_xdec RESULTS: "0.28", "0.07", "0.03", - "16.29", - "-16.05", + "16.36", + "-16.12", "17.26", - "1.21", + "1.14", "0.00", "52.19", "52.19", "180.70", - "179.50" + "179.57" ], "20-30_2": [ "17.76", @@ -2567,17 +2567,17 @@ TABLE dist2_xdec RESULTS: "0.02", "0.01", "3.07", - "0.91", + "0.84", "0.06", - "33.90", - "-31.67", + "34.88", + "-32.59", "31.14", - "-0.53", + "-1.45", "0.00", "93.78", "93.78", "327.17", - "327.70" + "328.62" ], "30-40_2": [ "17.75", @@ -2593,17 +2593,17 @@ TABLE dist2_xdec RESULTS: "0.05", "0.04", "10.38", - "3.54", + "3.29", "0.20", - "28.24", - "-21.20", + "29.43", + "-22.13", "43.22", - "22.02", + "21.09", "0.00", "127.28", "127.28", "476.31", - "454.29" + "455.22" ], "40-50_2": [ "17.73", @@ -2619,17 +2619,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "23.38", - "7.35", + "6.92", "0.34", - "19.72", - "-3.35", + "20.64", + "-3.84", "61.29", - "57.94", + "57.45", "0.00", "149.41", "149.41", "665.75", - "607.80" + "608.29" ], "50-60_2": [ "17.77", @@ -2645,17 +2645,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "43.80", - "12.84", + "11.89", "0.80", - "9.47", - "22.29", + "9.82", + "22.89", "85.09", - "107.38", + "107.98", "0.00", "147.37", "147.37", "898.01", - "790.63" + "790.03" ], "60-70_2": [ "17.72", @@ -2671,17 +2671,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "87.14", - "14.30", + "13.35", "0.69", - "4.03", - "69.50", + "4.11", + "70.37", "118.27", - "187.77", + "188.64", "0.00", "140.91", "140.91", "1207.32", - "1019.55" + "1018.68" ], "70-80_2": [ "17.78", @@ -2697,17 +2697,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.00", "159.09", - "18.60", + "17.76", "0.89", - "2.01", - "139.37", + "2.03", + "140.19", "173.38", - "312.75", + "313.57", "0.00", "140.66", "140.66", "1670.66", - "1357.90" + "1357.09" ], "80-90_2": [ "17.75", @@ -2723,17 +2723,17 @@ TABLE dist2_xdec RESULTS: "0.01", "0.07", "300.17", - "25.73", + "24.72", "2.31", "1.63", - "275.12", + "276.13", "266.59", - "541.72", + "542.73", "0.00", "123.76", "123.76", "2438.05", - "1896.33" + "1895.32" ], "90-100_2": [ "17.76", @@ -2749,17 +2749,17 @@ TABLE dist2_xdec RESULTS: "0.12", "16.19", "1544.93", - "42.93", + "41.88", "39.88", "0.52", - "1541.37", + "1542.42", "455.12", - "1996.49", + "1997.54", "0.00", "96.57", "96.57", "7231.85", - "5235.37" + "5234.31" ], "90-95_2": [ "8.87", @@ -2775,17 +2775,17 @@ TABLE dist2_xdec RESULTS: "0.00", "0.12", "279.77", - "14.59", + "13.74", "1.35", "0.51", - "266.02", + "266.87", "185.61", - "451.63", + "452.48", "0.00", "48.93", "48.93", "1772.06", - "1320.43" + "1319.58" ], "95-99_2": [ "7.10", @@ -2801,17 +2801,17 @@ TABLE dist2_xdec RESULTS: "0.03", "0.85", "514.36", - "13.46", + "13.27", "7.58", "0.01", - "508.46", + "508.65", "196.17", - "704.63", + "704.82", "0.00", "32.76", "32.76", "2516.12", - "1811.49" + "1811.30" ], "ALL_2": [ "177.52", @@ -2827,17 +2827,17 @@ TABLE dist2_xdec RESULTS: "0.20", "16.51", "2177.34", - "126.46", + "120.90", "45.48", - "119.23", - "1977.13", + "122.91", + "1979.02", "1258.76", - "3235.89", + "3237.77", "0.00", "1082.59", "1082.59", "14992.94", - "11757.06" + "11755.17" ], "Top 1%_2": [ "1.78", @@ -2853,16 +2853,16 @@ TABLE dist2_xdec RESULTS: "0.10", "15.21", "750.80", - "14.87", + "14.86", "30.96", "0.00", - "766.88", + "766.89", "73.35", - "840.23", + "840.24", "0.00", "14.87", "14.87", "2943.67", - "2103.44" + "2103.43" ] } diff --git a/taxcalc/tests/test_cpscsv.py b/taxcalc/tests/test_cpscsv.py index d983b2c59..cb40885b9 100644 --- a/taxcalc/tests/test_cpscsv.py +++ b/taxcalc/tests/test_cpscsv.py @@ -71,7 +71,7 @@ def test_agg(tests_path, cps_fullsample): msg = '' for cyr in range(calc_start_year, calc_start_year + nyrs): if cyr == calc_start_year: - reltol = 0.014 + reltol = 0.0141 else: reltol = 0.007 if not np.allclose(taxes_subsample[cyr], taxes_fullsample[cyr], diff --git a/taxcalc/validation/taxsim/a18.taxdiffs-expect b/taxcalc/validation/taxsim/a18.taxdiffs-expect index 0216846da..db4ecc7ac 100644 --- a/taxcalc/validation/taxsim/a18.taxdiffs-expect +++ b/taxcalc/validation/taxsim/a18.taxdiffs-expect @@ -1,8 +1,8 @@ TAXDIFF:ovar= 6 no-diffs -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 7 4513 0 22.00 [9688] - #big_vardiffs_with_big_inctax_diff= 4440 +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 7 10316 0 -27.00 [12552] + #big_vardiffs_with_big_inctax_diff= 10254 TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 9 124 0 0.90 [173] - #big_vardiffs_with_big_inctax_diff= 8 + #big_vardiffs_with_big_inctax_diff= 45 TAXDIFF:ovar= 10 no-diffs TAXDIFF:ovar= 11 no-diffs TAXDIFF:ovar= 12 no-diffs @@ -11,17 +11,17 @@ TAXDIFF:ovar= 15 no-diffs TAXDIFF:ovar= 16 no-diffs TAXDIFF:ovar= 17 no-diffs TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 18 14799 0 52.76 [28551] - #big_vardiffs_with_big_inctax_diff= 13545 -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 22 32307 0 2500.00 [77] - #big_vardiffs_with_big_inctax_diff= 13964 -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 23 2903 2 1500.00 [10677] - #big_vardiffs_with_big_inctax_diff= 2901 + #big_vardiffs_with_big_inctax_diff= 14706 +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 22 18433 0 2000.00 [79] + #big_vardiffs_with_big_inctax_diff= 10789 +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 23 7375 2 2425.00 [4049] + #big_vardiffs_with_big_inctax_diff= 7373 TAXDIFF:ovar= 24 no-diffs TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 25 10918 45 13.21 [56] #big_vardiffs_with_big_inctax_diff= 10873 TAXDIFF:ovar= 26 no-diffs TAXDIFF:ovar= 27 no-diffs TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 28 14799 0 9.23 [93] - #big_vardiffs_with_big_inctax_diff= 13545 -TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 4 22646 46 2409.23 [8903] - #big_inctax_diffs= 22600 + #big_vardiffs_with_big_inctax_diff= 14706 +TAXDIFF:ovar,#diffs,#smdiffs,maxdiff[id]= 4 32745 46 2508.44 [5159] + #big_inctax_diffs= 32699 diff --git a/taxcalc/validation/taxsim/process_taxcalc_output.py b/taxcalc/validation/taxsim/process_taxcalc_output.py index 723500b84..edaab46a9 100644 --- a/taxcalc/validation/taxsim/process_taxcalc_output.py +++ b/taxcalc/validation/taxsim/process_taxcalc_output.py @@ -121,8 +121,8 @@ def extract_output(out): ovar[19] = out['taxbc'] ovar[20] = 0.0 # always set exemption surtax to zero ovar[21] = 0.0 # always set general tax credit to zero - ovar[22] = out['c07220'] + out['dep_credit'] # child tax credit - ovar[23] = out['c11070'] # additional child tax credit + ovar[22] = out['c07220'] # non-refundable child and dependent tax credit + ovar[23] = out['c11070'] # additional (refundable) child tax credit ovar[24] = out['c07180'] # child care credit ovar[25] = out['eitc'] # federal EITC ovar[26] = out['c62100'] # federal AMT taxable income