diff --git a/README.md b/README.md index 194ee02d..520192a4 100644 --- a/README.md +++ b/README.md @@ -8,23 +8,24 @@ For Tax-Calculator results generated when using these TMD input files, see [this folder](https://github.com/PSLmodels/Tax-Calculator/tree/master/taxcalc/cli/input_data_tests). -The **current TMD version is 2.1.1**, which was released on May 28, -2026, and is the same as TMD version 2.0.0 except that Tax-Calculator -version 6.6.1 (instead of 6.5.3) is used to generate the TMD files. +The **current TMD version is 2.1.2**, which was released on May 29, +2026, and is the same as TMD version 2.1.1 except that Tax-Calculator +version 6.7.0 (instead of 6.6.1 or 6.6.2) is used to generate the TMD +files. This new Tax-Calculator version uses a more refined refundable +credit claiming logic, which causes minor changes in the TMD input +data files generated by this repo (even after some recalibration of +the TMD data generation logic). [Tax-Calculator pull request +3085](https://github.com/PSLmodels/Tax-Calculator/pull/3085) shows the +small differences in baseline policy results when using the new TMD +2.1.2 input data files. -The current TMD 2.1.1 version differs from the 2.0.0 version only -slightly in the national weights (all the `WT*` columns in the -`tmd_weights.csv.gz` file and just the `s006` variable in the -`tmd.csv.gz` file); the non-weights input variables in the -`tmd.csv.gz` file and the contents of `tmd_growfactors.csv` file are -unchanged. When using version 2.1.1 to generate **sub-national -weights**, there will be (presumably small) differences from the -sub-national weights generated using version 2.0.0; however, the -sub-national weights fingerprints have not yet been updated. +When using version 2.1.2 to generate **sub-national weights**, there +will be (presumably small) differences from the sub-national weights +generated using earlier versions; however, the sub-national weights +fingerprints have not yet been updated. -The prior TMD 2.0.0 version included the following significant +The earlier TMD 2.0.0 version introduced the following significant improvements: - - generate national, state, and Congressional district, input files for **2022**: [#470](https://github.com/PSLmodels/tax-microdata-benchmarking/pull/470) diff --git a/setup.py b/setup.py index 65c02655..26be4b1f 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ setup( name="tmd", - version="2.1.1", + version="2.1.2", packages=find_packages(), python_requires=">=3.11,<3.14", install_requires=[ - "taxcalc>=6.6.1", + "taxcalc>=6.7.0", "numpy", "pandas>=3.0.2", "clarabel", diff --git a/tests/expected_tax_exp_2022_data b/tests/expected_tax_exp_2022_data index ce5d3845..4bbd4ea3 100644 --- a/tests/expected_tax_exp_2022_data +++ b/tests/expected_tax_exp_2022_data @@ -1,8 +1,8 @@ -YR,KIND,EST= 2023 paytax 1429.5 +YR,KIND,EST= 2023 paytax 1428.8 YR,KIND,EST= 2023 iitax 2332.1 -YR,KIND,EST= 2023 ctc 118.6 -YR,KIND,EST= 2023 eitc 72.0 -YR,KIND,EST= 2023 social_security_partial_taxability 46.8 +YR,KIND,EST= 2023 ctc 129.6 +YR,KIND,EST= 2023 eitc 66.4 +YR,KIND,EST= 2023 social_security_partial_taxability 47.3 YR,KIND,EST= 2023 niit -47.4 YR,KIND,EST= 2023 cgqd_tax_preference 179.8 YR,KIND,EST= 2023 qbid 55.0 diff --git a/tests/expected_taxcalc_results_2022.yaml b/tests/expected_taxcalc_results_2022.yaml new file mode 100644 index 00000000..61f7c7c5 --- /dev/null +++ b/tests/expected_taxcalc_results_2022.yaml @@ -0,0 +1,23 @@ +# Expected 2022 EITC and ACTC aggregates from IRS Statistics of Income +# Publication 1304 (2022), Table A. +# +# DATA SOURCE +# Internal Revenue Service, "Statistics of Income — 2022 Individual +# Income Tax Returns," Publication 1304, Table A — "Selected Income +# and Tax Items, by Size and Accumulated Size of Adjusted Gross Income" +# +# DEFINITIONS +# n_returns_mil : Number of returns with a positive credit amount (millions). +# amount_bil : Total credit amount (billions of dollars). +# +# NOTES +# EITC = Earned Income Credit (refundable); taxcalc variable "eitc". +# ACTC = Additional Child Tax Credit (refundable); taxcalc variable "c11070". + +eitc: + n_returns_mil: 24.09 + amount_bil: 60.07 + +actc: + n_returns_mil: 18.08 + amount_bil: 34.84 diff --git a/tests/fingerprints/tmd_file_fingerprint.json b/tests/fingerprints/tmd_file_fingerprint.json index e7418e9b..3a6c530e 100644 --- a/tests/fingerprints/tmd_file_fingerprint.json +++ b/tests/fingerprints/tmd_file_fingerprint.json @@ -1,7 +1,7 @@ { "columns": { "DSI": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -9,31 +9,31 @@ "weighted_sum": 0.0 }, "EIC": { - "count": 215494, + "count": 215432, "max": 3.0, "min": 0.0, - "std": 0.998488924709226, - "sum": 142306.0, - "weighted_sum": 85531549.58765 + "std": 0.9988431546416128, + "sum": 142419.0, + "weighted_sum": 85873737.79837 }, "FLPDYR": { - "count": 215494, + "count": 215432, "max": 2022.0, "min": 2022.0, "std": 0.0, - "sum": 435728868.0, - "weighted_sum": 383705536579.71094 + "sum": 435603504.0, + "weighted_sum": 382982617566.7326 }, "MARS": { - "count": 215494, + "count": 215432, "max": 5.0, "min": 1.0, - "std": 0.8278563562706401, - "sum": 402557.0, - "weighted_sum": 327117996.02616006 + "std": 0.8284065770695873, + "sum": 402638.0, + "weighted_sum": 327237088.53251004 }, "MIDR": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -41,7 +41,7 @@ "weighted_sum": 0.0 }, "PT_SSTB_income": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -49,15 +49,15 @@ "weighted_sum": 0.0 }, "PT_binc_w2_wages": { - "count": 215494, + "count": 215432, "max": 31313015.0, "min": 0.0, - "std": 737875.8545888758, + "std": 737979.3512565867, "sum": 25230744106.0, - "weighted_sum": 284545997715.11224 + "weighted_sum": 284545792883.1683 }, "PT_ubia_property": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -65,23 +65,23 @@ "weighted_sum": 0.0 }, "RECID": { - "count": 215494, - "max": 215537.0, + "count": 215432, + "max": 215478.0, "min": 1.0, - "std": 62208.9556096498, - "sum": 23219092055.0, - "weighted_sum": 17877880700117.836 + "std": 62191.19758625769, + "sum": 23205751185.0, + "weighted_sum": 17801457113110.875 }, "XTOT": { - "count": 215494, + "count": 215432, "max": 8.0, "min": 0.0, - "std": 1.3123191488632904, - "sum": 487365.0, - "weighted_sum": 333976651.56875 + "std": 1.312462607835132, + "sum": 487423.0, + "weighted_sum": 333986688.42789 }, "a_lineno": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -89,23 +89,23 @@ "weighted_sum": 0.0 }, "age_head": { - "count": 215494, + "count": 215432, "max": 85.0, "min": 0.0, - "std": 16.087658679363, - "sum": 10432172.0, - "weighted_sum": 8643817897.237759 + "std": 16.099427046112577, + "sum": 10433791.0, + "weighted_sum": 8641948161.69323 }, "age_spouse": { - "count": 215494, + "count": 215432, "max": 85.0, "min": 0.0, - "std": 27.91597418922191, - "sum": 6305893.0, - "weighted_sum": 2891068727.6686 + "std": 27.916019560205985, + "sum": 6305672.0, + "weighted_sum": 2889433131.9135704 }, "agi_bin": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -113,31 +113,31 @@ "weighted_sum": 0.0 }, "auto_loan_interest": { - "count": 215494, + "count": 215432, "max": 29216.0, "min": 0.0, - "std": 1588.179244169335, - "sum": 118970180.0, - "weighted_sum": 93389910579.22197 + "std": 1586.614863745622, + "sum": 118719708.0, + "weighted_sum": 92522218812.05344 }, "blind_head": { - "count": 215494, + "count": 215432, "max": 1.0, "min": 0.0, - "std": 0.03968980710581373, - "sum": 340.0, - "weighted_sum": 1128485.4318900001 + "std": 0.03957876921942024, + "sum": 338.0, + "weighted_sum": 1118623.88786 }, "blind_spouse": { - "count": 215494, + "count": 215432, "max": 1.0, "min": 0.0, - "std": 0.005699337491585952, - "sum": 7.0, - "weighted_sum": 22359.33323 + "std": 0.005277332655293923, + "sum": 6.0, + "weighted_sum": 18412.565179999998 }, "cmbtp": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -145,495 +145,495 @@ "weighted_sum": 0.0 }, "data_source": { - "count": 215494, + "count": 215432, "max": 1.0, "min": 0.0, - "std": 0.18680034526742112, + "std": 0.1861101894686241, "sum": 207692.0, - "weighted_sum": 162125804.1785 + "weighted_sum": 162125458.44924 }, "e00200": { - "count": 215494, + "count": 215432, "max": 158001246.0, "min": 0.0, - "std": 3838289.3639592775, - "sum": 135569085547.0, - "weighted_sum": 9729692790533.416 + "std": 3838827.7105363873, + "sum": 135567885986.0, + "weighted_sum": 9725258018179.902 }, "e00200p": { - "count": 215494, + "count": 215432, "max": 146649912.0, "min": 0.0, - "std": 3074309.944469237, - "sum": 100917700743.0, - "weighted_sum": 7582292918196.261 + "std": 3074742.855746403, + "sum": 100916524524.0, + "weighted_sum": 7577882509415.301 }, "e00200s": { - "count": 215494, + "count": 215432, "max": 131089978.0, "min": 0.0, - "std": 1407594.8945087728, - "sum": 34651384804.0, - "weighted_sum": 2147399872337.153 + "std": 1407794.7970084827, + "sum": 34651361462.0, + "weighted_sum": 2147375508764.5996 }, "e00300": { - "count": 215494, + "count": 215432, "max": 61918081.0, "min": 0.0, - "std": 711371.8545826309, - "sum": 14959491444.0, - "weighted_sum": 134805822500.00314 + "std": 711473.2202871683, + "sum": 14959528896.0, + "weighted_sum": 134958494140.81647 }, "e00400": { - "count": 215494, + "count": 215432, "max": 11301339.0, "min": 0.0, - "std": 177842.6371643936, - "sum": 4044710003.0, - "weighted_sum": 56406304151.29176 + "std": 177867.93328702226, + "sum": 4044727621.0, + "weighted_sum": 56478147255.37259 }, "e00600": { - "count": 215494, + "count": 215432, "max": 185467468.0, "min": 0.0, - "std": 1955792.2795310856, - "sum": 41042235014.0, - "weighted_sum": 412887295610.6207 + "std": 1956071.0197042765, + "sum": 41042241365.0, + "weighted_sum": 412896467107.35693 }, "e00650": { - "count": 215494, + "count": 215432, "max": 180321892.0, "min": 0.0, - "std": 1769608.566097811, - "sum": 32307238293.0, - "weighted_sum": 312649853345.97015 + "std": 1769861.3599204314, + "sum": 32307241138.0, + "weighted_sum": 312653986955.9606 }, "e00700": { - "count": 215494, + "count": 215432, "max": 7423763.0, "min": 0.0, - "std": 122139.07168429166, + "std": 122156.4097438943, "sum": 3050450092.0, - "weighted_sum": 45119129442.574776 + "weighted_sum": 45119021341.36163 }, "e00800": { - "count": 215494, + "count": 215432, "max": 460766.0, "min": 0.0, - "std": 3179.6374471537642, + "std": 3180.094785215266, "sum": 13169293.0, - "weighted_sum": 16700874386.651384 + "weighted_sum": 16700075897.528212 }, "e00900": { - "count": 215494, + "count": 215432, "max": 26763122.0, "min": -50236735.0, - "std": 593859.8539200913, + "std": 593945.1236010923, "sum": 5852882933.0, - "weighted_sum": 411465033628.61115 + "weighted_sum": 411465040377.0045 }, "e00900p": { - "count": 215494, + "count": 215432, "max": 26763122.0, "min": -43918428.0, - "std": 506638.36885149596, + "std": 506711.1444592021, "sum": 4481330664.0, - "weighted_sum": 315389892675.4016 + "weighted_sum": 315388176128.5863 }, "e00900s": { - "count": 215494, + "count": 215432, "max": 18599368.0, "min": -33603257.0, - "std": 198752.70687436213, + "std": 198781.2753852086, "sum": 1371552269.0, - "weighted_sum": 96075140953.20947 + "weighted_sum": 96076864248.41814 }, "e01100": { - "count": 215494, + "count": 215432, "max": 3199159.0, "min": 0.0, - "std": 9337.921477961652, + "std": 9339.264557117987, "sum": 39668789.0, - "weighted_sum": 12797168638.40104 + "weighted_sum": 12797168593.34811 }, "e01200": { - "count": 215494, + "count": 215432, "max": 62352563.0, "min": -35655204.0, - "std": 581069.2229320295, + "std": 581152.7648917192, "sum": 3520229342.0, - "weighted_sum": -44828811385.52922 + "weighted_sum": -44829383012.77958 }, "e01400": { - "count": 215494, + "count": 215432, "max": 7902154.0, "min": 0.0, - "std": 83296.2293973766, - "sum": 1945050082.0, - "weighted_sum": 440177356532.94904 + "std": 83308.0709631266, + "sum": 1945057159.0, + "weighted_sum": 440200588941.80707 }, "e01500": { - "count": 215494, + "count": 215432, "max": 27560876.0, "min": 0.0, - "std": 321211.9499791954, - "sum": 10311950944.0, - "weighted_sum": 1535732120017.0256 + "std": 321257.09991838963, + "sum": 10312016862.0, + "weighted_sum": 1535877010890.046 }, "e01700": { - "count": 215494, + "count": 215432, "max": 4930050.0, "min": 0.0, - "std": 56062.81195281425, - "sum": 2182787272.0, - "weighted_sum": 915290496211.8649 + "std": 56070.57952795099, + "sum": 2182853190.0, + "weighted_sum": 915445028120.0986 }, "e02000": { - "count": 215494, + "count": 215432, "max": 201882312.0, "min": -179684656.0, - "std": 5276792.171763604, - "sum": 133913067850.0, - "weighted_sum": 1147033652281.531 + "std": 5277540.887679188, + "sum": 133913088698.0, + "weighted_sum": 1147076508216.3013 }, "e02100": { - "count": 215494, + "count": 215432, "max": 18904982.0, "min": -2500.0, - "std": 136964.3476399141, + "std": 136984.04568827117, "sum": 640434462.0, - "weighted_sum": 7384956507.26925 + "weighted_sum": 7385115964.57203 }, "e02100p": { - "count": 215494, + "count": 215432, "max": 14541252.0, "min": -2500.0, - "std": 102235.67378073317, + "std": 102250.37750062582, "sum": 467305339.0, - "weighted_sum": 5708935350.404577 + "weighted_sum": 5709050675.40151 }, "e02100s": { - "count": 215494, + "count": 215432, "max": 15334893.0, "min": 0.0, - "std": 61962.45767993599, + "std": 61971.371745786644, "sum": 173129123.0, - "weighted_sum": 1676021156.86467 + "weighted_sum": 1676065289.1705203 }, "e02300": { - "count": 215494, + "count": 215432, "max": 31090.0, "min": 0.0, - "std": 1023.5009754348871, - "sum": 26629681.0, - "weighted_sum": 30619777466.657185 + "std": 1023.6214963160595, + "sum": 26618307.0, + "weighted_sum": 30567059465.96073 }, "e02400": { - "count": 215494, + "count": 215432, "max": 194473.0, "min": 0.0, - "std": 16831.347608656735, - "sum": 1569139076.0, - "weighted_sum": 903437296810.8677 + "std": 16832.345430735797, + "sum": 1570512653.0, + "weighted_sum": 907514363945.7084 }, "e03150": { - "count": 215494, + "count": 215432, "max": 17617.0, "min": 0.0, - "std": 1827.6895099426192, + "std": 1827.9474544437364, "sum": 54493998.0, - "weighted_sum": 20428628316.86713 + "weighted_sum": 20428125723.50502 }, "e03210": { - "count": 215494, + "count": 215432, "max": 3387.0, "min": 0.0, - "std": 390.7127707576394, + "std": 390.7674542477835, "sum": 13910295.0, - "weighted_sum": 20143529035.477135 + "weighted_sum": 20142836991.31869 }, "e03220": { - "count": 215494, + "count": 215432, "max": 677.0, "min": 0.0, - "std": 48.09177439447757, + "std": 48.09857475787423, "sum": 1361161.0, - "weighted_sum": 1356093853.21345 + "weighted_sum": 1356073271.73802 }, "e03230": { - "count": 215494, + "count": 215432, "max": 5420.0, "min": 0.0, - "std": 307.1340170659197, + "std": 307.1779985143043, "sum": 4572915.0, - "weighted_sum": 5546603083.37946 + "weighted_sum": 5548495926.75733 }, "e03240": { - "count": 215494, + "count": 215432, "max": 10247991.0, "min": 0.0, - "std": 182400.83219234663, + "std": 182426.9176183379, "sum": 3064867345.0, - "weighted_sum": 18679121586.447872 + "weighted_sum": 18678170577.60179 }, "e03270": { - "count": 215494, + "count": 215432, "max": 118444.0, "min": 0.0, - "std": 7473.512375212274, + "std": 7474.484029260145, "sum": 500028611.0, - "weighted_sum": 42722294934.9787 + "weighted_sum": 42720018777.89611 }, "e03290": { - "count": 215494, + "count": 215432, "max": 13551.0, "min": 0.0, - "std": 1368.2646734011444, + "std": 1368.4561174858818, "sum": 48966082.0, - "weighted_sum": 6495107439.895511 + "weighted_sum": 6495408671.040779 }, "e03300": { - "count": 215494, + "count": 215432, "max": 948637.0, "min": 0.0, - "std": 23847.615526769452, + "std": 23850.960895812936, "sum": 813401582.0, - "weighted_sum": 32703657761.964504 + "weighted_sum": 32703384513.448494 }, "e03400": { - "count": 215494, + "count": 215432, "max": 69386.0, "min": 0.0, - "std": 223.64246796075335, + "std": 223.674640545783, "sum": 688077.0, - "weighted_sum": 104027001.98055004 + "weighted_sum": 104022550.71322 }, "e03500": { - "count": 215494, + "count": 215432, "max": 184984.0, "min": 0.0, - "std": 1841.662414259818, + "std": 1841.9270332275137, "sum": 14858202.0, - "weighted_sum": 10409595764.023422 + "weighted_sum": 10409757744.176031 }, "e07240": { - "count": 215494, + "count": 215432, "max": 2710.0, "min": 0.0, - "std": 59.24132562097543, + "std": 59.249733024287465, "sum": 1493106.0, - "weighted_sum": 2091563592.0978901 + "weighted_sum": 2091676733.4656498 }, "e07260": { - "count": 215494, + "count": 215432, "max": 1764465.0, "min": 0.0, - "std": 4935.572680554544, + "std": 4936.282429564261, "sum": 25664046.0, - "weighted_sum": 3151231819.4448 + "weighted_sum": 3151264753.14021 }, "e07300": { - "count": 215494, + "count": 215432, "max": 23024778.0, "min": 0.0, - "std": 331846.5952684108, + "std": 331894.1576969627, "sum": 4460805245.0, - "weighted_sum": 32587502156.164803 + "weighted_sum": 32587553042.021893 }, "e07400": { - "count": 215494, + "count": 215432, "max": 7856070.0, "min": 0.0, - "std": 71614.69238332358, + "std": 71624.9696893676, "sum": 791134935.0, - "weighted_sum": 5230793411.126049 + "weighted_sum": 5230783496.10604 }, "e07600": { - "count": 215494, + "count": 215432, "max": 1939285.0, "min": 0.0, - "std": 15155.787254384139, + "std": 15157.965767499392, "sum": 103747781.0, - "weighted_sum": 1246854202.1260395 + "weighted_sum": 1246857035.2003798 }, "e09700": { - "count": 215494, + "count": 215432, "max": 6803.0, "min": 0.0, - "std": 16.651061279216545, + "std": 16.653457115563956, "sum": 12182.0, - "weighted_sum": 10162844.90742 + "weighted_sum": 10162979.77321 }, "e09800": { - "count": 215494, + "count": 215432, "max": 8578.0, "min": 0.0, - "std": 19.96441836745499, + "std": 19.967290863197288, "sum": 27311.0, - "weighted_sum": 19609584.83888 + "weighted_sum": 19608900.86962 }, "e09900": { - "count": 215494, + "count": 215432, "max": 267244.0, "min": 0.0, - "std": 1671.5709903762297, + "std": 1671.810621757451, "sum": 21850771.0, - "weighted_sum": 8010111200.159989 + "weighted_sum": 8009679600.45321 }, "e11200": { - "count": 215494, + "count": 215432, "max": 63152.0, "min": 0.0, - "std": 1601.9242793125295, + "std": 1602.1489625584525, "sum": 54810849.0, - "weighted_sum": 4749560769.048221 + "weighted_sum": 4749580536.57944 }, "e17500": { - "count": 215494, + "count": 215432, "max": 792248.0, "min": 0.0, - "std": 10990.025327581932, + "std": 10991.588467306674, "sum": 253887516.0, - "weighted_sum": 170528913909.55905 + "weighted_sum": 170531953054.35077 }, "e18400": { - "count": 215494, + "count": 215432, "max": 47954731.0, "min": 0.0, - "std": 1028436.4769234683, + "std": 1028579.6803968969, "sum": 39805235783.0, - "weighted_sum": 527918889593.0678 + "weighted_sum": 527919599008.1664 }, "e18500": { - "count": 215494, + "count": 215432, "max": 1781924.0, "min": 0.0, - "std": 48497.23595172148, + "std": 48503.51849928277, "sum": 3299136260.0, - "weighted_sum": 285652168369.64087 + "weighted_sum": 285657352348.31274 }, "e19200": { - "count": 215494, + "count": 215432, "max": 20871618.0, "min": 0.0, - "std": 222088.77233248777, + "std": 222120.42566455784, "sum": 4654041060.0, - "weighted_sum": 377539697396.4865 + "weighted_sum": 377541565220.75366 }, "e19800": { - "count": 215494, + "count": 215432, "max": 65015608.0, "min": 0.0, - "std": 682374.0355993224, + "std": 682471.5305659372, "sum": 12321188081.0, - "weighted_sum": 199380092052.27438 + "weighted_sum": 199380033749.98804 }, "e20100": { - "count": 215494, + "count": 215432, "max": 133879803.0, "min": 0.0, - "std": 1111436.3147192635, + "std": 1111595.6811267529, "sum": 14099697665.0, - "weighted_sum": 91118775709.33383 + "weighted_sum": 91120148399.85477 }, "e20400": { - "count": 215494, + "count": 215432, "max": 19975587.0, "min": 0.0, - "std": 321238.61659574416, + "std": 321284.15196525154, "sum": 8435836745.0, - "weighted_sum": 232786574131.2084 + "weighted_sum": 232785046918.38406 }, "e24515": { - "count": 215494, + "count": 215432, "max": 35072470.0, "min": 0.0, - "std": 387541.73958224, + "std": 387597.33806525345, "sum": 4522551372.0, - "weighted_sum": 49147051362.724846 + "weighted_sum": 49147520497.93848 }, "e24518": { - "count": 215494, + "count": 215432, "max": 30708739.0, "min": 0.0, - "std": 271447.34343111835, + "std": 271486.36828068004, "sum": 1694322554.0, - "weighted_sum": 8396049641.8932 + "weighted_sum": 8396106578.22369 }, "e26270": { - "count": 215494, + "count": 215432, "max": 202019457.0, "min": -179393560.0, - "std": 5143545.889829284, + "std": 5144276.844449351, "sum": 123113181769.0, - "weighted_sum": 1032383271061.1552 + "weighted_sum": 1032383256547.6865 }, "e27200": { - "count": 215494, + "count": 215432, "max": 1924378.0, "min": -788181.0, - "std": 10923.40714025841, + "std": 10924.978380032713, "sum": 41631327.0, - "weighted_sum": 5696208823.678238 + "weighted_sum": 5697297469.7313595 }, "e32800": { - "count": 215494, + "count": 215432, "max": 8131.0, "min": 0.0, - "std": 991.5737233513782, + "std": 991.7117352053626, "sum": 38622412.0, - "weighted_sum": 24873073295.794853 + "weighted_sum": 24873019034.264133 }, "e58990": { - "count": 215494, + "count": 215432, "max": 23986967.0, "min": 0.0, - "std": 145964.00334035023, + "std": 145984.98815215658, "sum": 906483448.0, - "weighted_sum": 5986557718.189501 + "weighted_sum": 5986550406.385651 }, "e62900": { - "count": 215494, + "count": 215432, "max": 27117470.0, "min": 0.0, - "std": 293671.35677486146, + "std": 293713.44888597704, "sum": 3933115700.0, - "weighted_sum": 27963256148.689045 + "weighted_sum": 27963352411.092934 }, "e87521": { - "count": 215494, + "count": 215432, "max": 19921.0, "min": 0.0, - "std": 669.6208141520913, + "std": 669.7140141577631, "sum": 26086045.0, - "weighted_sum": 30558842511.86818 + "weighted_sum": 30558969870.65142 }, "e87530": { - "count": 215494, + "count": 215432, "max": 5420.0, "min": 0.0, - "std": 307.1340170659197, + "std": 307.1779985143043, "sum": 4572915.0, - "weighted_sum": 5546603083.37946 + "weighted_sum": 5548495926.75733 }, "elderly_dependents": { - "count": 215494, + "count": 215432, "max": 2.0, "min": 0.0, - "std": 0.014449314952718903, + "std": 0.014451393618394766, "sum": 43.0, - "weighted_sum": 145640.1216 + "weighted_sum": 146907.10287 }, "f2441": { - "count": 215494, + "count": 215432, "max": 6.0, "min": 0.0, - "std": 0.8664338180894957, - "sum": 106241.0, - "weighted_sum": 59733822.511510015 + "std": 0.8668856400625624, + "sum": 106335.0, + "weighted_sum": 60029734.21513 }, "f6251": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -641,7 +641,7 @@ "weighted_sum": 0.0 }, "ffpos": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -649,7 +649,7 @@ "weighted_sum": 0.0 }, "fips": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -657,15 +657,15 @@ "weighted_sum": 0.0 }, "g20500": { - "count": 215494, + "count": 215432, "max": 1881011.0, "min": 0.0, - "std": 6941.139303463316, + "std": 6942.137953097033, "sum": 13962177.0, - "weighted_sum": 2535688446.4736805 + "weighted_sum": 2535861912.78501 }, "h_seq": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -673,7 +673,7 @@ "weighted_sum": 0.0 }, "housing_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -681,7 +681,7 @@ "weighted_sum": 0.0 }, "k1bx14p": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -689,7 +689,7 @@ "weighted_sum": 0.0 }, "k1bx14s": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -697,7 +697,7 @@ "weighted_sum": 0.0 }, "mcaid_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -705,7 +705,7 @@ "weighted_sum": 0.0 }, "mcare_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -713,55 +713,55 @@ "weighted_sum": 0.0 }, "n1820": { - "count": 215494, + "count": 215432, "max": 3.0, "min": 0.0, - "std": 0.20452203627374832, - "sum": 8747.0, - "weighted_sum": 5864275.79037 + "std": 0.20459200002768965, + "sum": 8751.0, + "weighted_sum": 5887921.68535 }, "n21": { - "count": 215494, + "count": 215432, "max": 3.0, "min": 0.0, - "std": 0.26523706672634395, - "sum": 13308.0, - "weighted_sum": 11545428.449310001 + "std": 0.26527866735187444, + "sum": 13311.0, + "weighted_sum": 11565468.30432 }, "n24": { - "count": 215494, + "count": 215432, "max": 7.0, "min": 0.0, - "std": 0.959182307062835, - "sum": 129473.0, - "weighted_sum": 76365306.90682001 + "std": 0.9596573668181093, + "sum": 129583.0, + "weighted_sum": 76698091.85684001 }, "nu06": { - "count": 215494, + "count": 215432, "max": 4.0, "min": 0.0, - "std": 0.7409575899032155, - "sum": 69899.0, - "weighted_sum": 32601178.87357 + "std": 0.7411776066600965, + "sum": 69941.0, + "weighted_sum": 32737498.36813 }, "nu13": { - "count": 215494, + "count": 215432, "max": 6.0, "min": 0.0, - "std": 0.8872075788025847, - "sum": 107919.0, - "weighted_sum": 61067464.6771 + "std": 0.8876496487993337, + "sum": 108013.0, + "weighted_sum": 61363379.653610006 }, "nu18": { - "count": 215494, + "count": 215432, "max": 7.0, "min": 0.0, - "std": 0.9785226575847404, - "sum": 134984.0, - "weighted_sum": 79834027.10920005 + "std": 0.979046321956348, + "sum": 135103.0, + "weighted_sum": 80189637.51690999 }, "other_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -769,63 +769,63 @@ "weighted_sum": 0.0 }, "overtime_income": { - "count": 215494, - "max": 68080116.0, + "count": 215432, + "max": 42298152.0, "min": 0.0, - "std": 286623.9497078295, - "sum": 2451145686.0, - "weighted_sum": 253142686412.84302 + "std": 222082.1883073958, + "sum": 2345031171.0, + "weighted_sum": 258217400541.15808 }, "p08000": { - "count": 215494, + "count": 215432, "max": 73858.0, "min": 0.0, - "std": 622.1213406287744, + "std": 622.2106055132916, "sum": 7084352.0, - "weighted_sum": 1032796363.63721 + "weighted_sum": 1032781389.5305899 }, "p22250": { - "count": 215494, + "count": 215432, "max": 94633330.0, "min": -127307103.0, - "std": 1321095.515814732, - "sum": -1646866639.0, - "weighted_sum": -106928862011.1797 + "std": 1321285.5973798847, + "sum": -1646865403.0, + "weighted_sum": -106922752640.02774 }, "p23250": { - "count": 215494, + "count": 215432, "max": 250575723.0, "min": -42756430.0, - "std": 7029999.772467691, - "sum": 230507613477.0, - "weighted_sum": 1126417211741.7278 + "std": 7030987.864665172, + "sum": 230507622544.0, + "weighted_sum": 1126451742746.6628 }, "pencon_p": { - "count": 215494, + "count": 215432, "max": 27000.0, "min": 0.0, - "std": 6385.947064268348, + "std": 6386.634275408459, "sum": 690867044.0, - "weighted_sum": 263781936682.88354 + "weighted_sum": 263780602127.78503 }, "pencon_s": { - "count": 215494, + "count": 215432, "max": 27000.0, "min": 0.0, - "std": 4874.62501641623, + "std": 4875.236518847078, "sum": 376013951.0, - "weighted_sum": 76617720814.66776 + "weighted_sum": 76618038200.95807 }, "s006": { - "count": 215494, - "max": 16580.29984, + "count": 215432, + "max": 16580.29985, "min": 0.10804, - "std": 1092.9933025486473, - "sum": 189765349.44595, - "weighted_sum": 424545077258.6477 + "std": 1089.9746207461715, + "sum": 189407822.7333, + "weighted_sum": 422470205255.08075 }, "snap_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -833,7 +833,7 @@ "weighted_sum": 0.0 }, "ssi_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -841,7 +841,7 @@ "weighted_sum": 0.0 }, "tanf_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -849,15 +849,15 @@ "weighted_sum": 0.0 }, "tip_income": { - "count": 215494, - "max": 24144116.0, + "count": 215432, + "max": 25638266.0, "min": 0.0, - "std": 103060.21598597325, - "sum": 454325261.0, - "weighted_sum": 65982037358.30429 + "std": 89239.98024978867, + "sum": 381676152.0, + "weighted_sum": 64327204067.11644 }, "vet_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -865,7 +865,7 @@ "weighted_sum": 0.0 }, "wic_ben": { - "count": 215494, + "count": 215432, "max": 0.0, "min": 0.0, "std": 0.0, @@ -874,11 +874,11 @@ } }, "metadata": { - "generated": "2026-04-24", + "generated": "2026-06-27", "n_columns": 109, - "n_records": 215494, + "n_records": 215432, "scope": "tmd_file", - "taxcalc_version": "6.5.2", + "taxcalc_version": "6.7.0", "taxyear": 2022 } -} +} \ No newline at end of file diff --git a/tests/test_imputed_variables.py b/tests/test_imputed_variables.py index 4aa2a2f5..a0890545 100644 --- a/tests/test_imputed_variables.py +++ b/tests/test_imputed_variables.py @@ -7,7 +7,7 @@ import numpy as np import pytest import taxcalc -from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC, CREDIT_CLAIMING +from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC from tests.conftest import create_tmd_records @@ -55,9 +55,9 @@ def actual_results(rdf, bdf): # https://taxpolicycenter.org/taxvox/ # budget-laws-tax-cuts-overtime-and- # tips-are-popular-few-will-benefit - "exp_totben_2022": 23.71, - "exp_affpct_2022": 8.56, - "exp_affben_2022": 1413, + "exp_totben_2022": 24.47, + "exp_affpct_2022": 8.95, + "exp_affben_2022": 1398, }, "TIP": { # new OBBBA tip income deduction "reform_dict": {"TipIncomeDed_c": {simyear: 0}}, @@ -72,9 +72,9 @@ def actual_results(rdf, bdf): # https://taxpolicycenter.org/taxvox/ # budget-laws-tax-cuts-overtime-and- # tips-are-popular-few-will-benefit - "exp_totben_2022": 7.11, - "exp_affpct_2022": 2.59, - "exp_affben_2022": 1401, + "exp_totben_2022": 7.31, + "exp_affpct_2022": 2.68, + "exp_affben_2022": 1397, }, "ALI": { # new OBBBA auto loan interest deduction "reform_dict": {"AutoLoanInterestDed_c": {simyear: 0}}, @@ -87,9 +87,9 @@ def actual_results(rdf, bdf): # because the Tax Policy Center did not provide any # statistics for this new deduction. However, see the # following reform analysis for FOUR reforms. - "exp_totben_2022": 7.87, - "exp_affpct_2022": 12.28, - "exp_affben_2022": 327, + "exp_totben_2022": 8.05, + "exp_affpct_2022": 12.87, + "exp_affben_2022": 319, }, "ALL": { # above three deductions plus new OBBBA senior deduction "reform_dict": { @@ -107,9 +107,9 @@ def actual_results(rdf, bdf): # https://taxpolicycenter.org/model-estimates/T25-0257 # Note that the $1081 TPC estimate is derived by dividing # the all-unit average of $320 by the 0.296 affpct. - "exp_totben_2022": 58.97, - "exp_affpct_2022": 28.24, - "exp_affben_2022": 1065, + "exp_totben_2022": 60.14, + "exp_affpct_2022": 29.19, + "exp_affben_2022": 1054, }, } output_variables = [ @@ -125,7 +125,6 @@ def actual_results(rdf, bdf): # create baseline_sim Calculator object for simyear and get its output pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) baseline_sim = taxcalc.Calculator(policy=pol, records=recs) baseline_sim.advance_to_year(simyear) baseline_sim.calc_all() @@ -143,7 +142,6 @@ def actual_results(rdf, bdf): # create reform Calculator object for simyear reform_policy = taxcalc.Policy() reform_policy.implement_reform(SOI_IITAX_SPEC) - reform_policy.implement_reform(CREDIT_CLAIMING) reform_policy.implement_reform(info["reform_dict"]) reform_sim = taxcalc.Calculator(policy=reform_policy, records=recs) reform_sim.advance_to_year(simyear) diff --git a/tests/test_misc.py b/tests/test_misc.py index 651c3a3b..a8b5f803 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -24,7 +24,7 @@ def test_population(tmd_variables): # to December 1, 2026 (NA-EST2025-POP)" table which is at this URL: # https://www.census.gov/data/tables/time-series/demo/popest/ # 2020s-national-total.html - r_tol = 0.001 + r_tol = 0.0001 assert abs(pop / exp_pop[TAXYEAR] - 1) < r_tol, ( f"{TAXYEAR} population ({pop:.2f}) not within {(r_tol * 100):.1f}% " f"of expected {exp_pop[TAXYEAR]:.2f} million" diff --git a/tests/test_revenue_levels_cbo.py b/tests/test_revenue_levels_cbo.py index bca39bf5..a9886018 100644 --- a/tests/test_revenue_levels_cbo.py +++ b/tests/test_revenue_levels_cbo.py @@ -18,7 +18,7 @@ import pytest import taxcalc -from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC, CREDIT_CLAIMING +from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC # Per-year relative tolerance for all three aggregates. RELTOL = { @@ -46,7 +46,6 @@ def test_revenue_levels_cbo( pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) rec = taxcalc.Records( data=tmd_variables, start_year=TAXYEAR, diff --git a/tests/test_soi_sanity_2022.py b/tests/test_soi_sanity_2022.py index 74c971c7..d076c7a2 100644 --- a/tests/test_soi_sanity_2022.py +++ b/tests/test_soi_sanity_2022.py @@ -49,7 +49,7 @@ import taxcalc from tmd.storage import STORAGE_FOLDER -from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC, CREDIT_CLAIMING +from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC SOI_YEAR = 2022 RELATIVE_TOLERANCE = 0.01 @@ -91,7 +91,6 @@ def test_soi_sanity_2022( # all five aggregates. pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) recs = taxcalc.Records( data=tmd_variables, start_year=TAXYEAR, diff --git a/tests/test_taxcalc_results_2022.py b/tests/test_taxcalc_results_2022.py new file mode 100644 index 00000000..2f3810ad --- /dev/null +++ b/tests/test_taxcalc_results_2022.py @@ -0,0 +1,81 @@ +""" +Test that 2022 Tax-Calculator results for EITC and ACTC match +IRS Statistics of Income (SOI) Publication 1304 aggregates. + +Comparisons (all tax units, year 2022): + - Earned Income Credit (EITC): count (millions) and amount (billions) + - Additional Child Tax Credit (ACTC): count (millions) and amount (billions) +""" + +import yaml +import pytest +import taxcalc +from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC + +MAX_RELATIVE_TOLERANCE = { + "n_returns_mil": 0.082, + "amount_bil": 0.004, +} + + +@pytest.mark.skipif( + TAXYEAR != 2022, + reason="expected values are calibrated to TAXYEAR=2022", +) +def test_taxcalc_results_2022( + tests_folder, tmd_variables, tmd_weights_path, tmd_growfactors_path +): + epath = tests_folder / "expected_taxcalc_results_2022.yaml" + with open(epath, "r", encoding="utf-8") as f: + expect = yaml.safe_load(f) + + pol = taxcalc.Policy() + pol.implement_reform(SOI_IITAX_SPEC) + recs = taxcalc.Records( + data=tmd_variables, + start_year=TAXYEAR, + weights=str(tmd_weights_path), + gfactors=taxcalc.GrowFactors( + growfactors_filename=str(tmd_growfactors_path) + ), + adjust_ratios=None, + exact_calculations=True, + weights_scale=1.0, + ) + sim = taxcalc.Calculator(policy=pol, records=recs) + sim.advance_to_year(TAXYEAR) + sim.calc_all() + + wt = sim.array("s006") + eitc = sim.array("eitc") + actc = sim.array("c11070") + + actual = { + "eitc": { + "n_returns_mil": float((wt * (eitc > 0)).sum() * 1e-6), + "amount_bil": float((wt * eitc).sum() * 1e-9), + }, + "actc": { + "n_returns_mil": float((wt * (actc > 0)).sum() * 1e-6), + "amount_bil": float((wt * actc).sum() * 1e-9), + }, + } + + errors = [] + for credit in ("eitc", "actc"): + for metric in ("n_returns_mil", "amount_bil"): + act = actual[credit][metric] + exp = expect[credit][metric] + rel_diff = act / exp - 1.0 + if abs(rel_diff) >= MAX_RELATIVE_TOLERANCE[metric]: + errors.append( + f"{credit}.{metric}: " + f"act={act:.2f} exp={exp:.2f} " + f"rel_diff={rel_diff:+.4f} " + f"tol={MAX_RELATIVE_TOLERANCE[metric]:.4f}" + ) + + if errors: + raise ValueError( + "\nACT-vs-EXP TAXCALC 2022 DIFFERENCES:\n" + "\n".join(errors) + ) diff --git a/tests/test_weights.py b/tests/test_weights.py index ee10413b..1d7de95a 100644 --- a/tests/test_weights.py +++ b/tests/test_weights.py @@ -44,16 +44,16 @@ def test_weights(tmd_variables): "sum_sq": 478456942738.8, }, "tmd2022": { - "n": 215494, - "total": 189765349.4, - "mean": 880.606, - "sdev": 1092.99, + "n": 215432, + "total": 189407822.7, + "mean": 879.200, + "sdev": 1089.97, "min": 0.10804, - "p25": 21.8191, - "p50": 398.097, - "p75": 1437.785, - "max": 16580.3, - "sum_sq": 424545077258.6, + "p25": 21.7997, + "p50": 397.248, + "p75": 1437.74, + "max": 16580.30, + "sum_sq": 422470205255.1, }, } # all float stats checked with np.allclose defaults diff --git a/tmd/create_taxcalc_cached_files.py b/tmd/create_taxcalc_cached_files.py index 0cd4a313..41871964 100644 --- a/tmd/create_taxcalc_cached_files.py +++ b/tmd/create_taxcalc_cached_files.py @@ -6,7 +6,7 @@ import pandas as pd import taxcalc from tmd.storage import STORAGE_FOLDER, CACHED_TAXCALC_VARIABLES -from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC, CREDIT_CLAIMING +from tmd.imputation_assumptions import TAXYEAR, SOI_IITAX_SPEC INFILE_PATH = STORAGE_FOLDER / "output" / "tmd.csv.gz" WTFILE_PATH = STORAGE_FOLDER / "output" / "tmd_weights.csv.gz" @@ -23,7 +23,6 @@ def create_cached_files(): # hardcodes start_year=2021 in the taxcalc library). pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) rec = taxcalc.Records( data=pd.read_csv(INFILE_PATH), start_year=TAXYEAR, diff --git a/tmd/create_taxcalc_input_variables.py b/tmd/create_taxcalc_input_variables.py index e2777844..f65e8916 100644 --- a/tmd/create_taxcalc_input_variables.py +++ b/tmd/create_taxcalc_input_variables.py @@ -30,7 +30,7 @@ def create_variable_file(write_file=True): print(f" ASSUMED SALT_GROW_RATE = {SALT_GROW_RATE:.3f}") print(f" ASSUMED ITMDED_GROW_RATE = {ITMDED_GROW_RATE:.3f}") print(f" ASSUMED W2_WAGES_RATIO = {W2_WAGES_RATIO[TAXYEAR]:.5f}") - print(f" ASSUMED CPS_WEIGHTS_SCALE = {CPS_WEIGHTS_SCALE[TAXYEAR]:.2f}") + print(f" ASSUMED CPS_WEIGHTS_SCALE = {CPS_WEIGHTS_SCALE[TAXYEAR]:.3f}") vdf = create_tmd_dataframe(TAXYEAR) vdf.FLPDYR = TAXYEAR vdf.agi_bin = 0 diff --git a/tmd/datasets/cps.py b/tmd/datasets/cps.py index 700cf3fb..7304fe9d 100644 --- a/tmd/datasets/cps.py +++ b/tmd/datasets/cps.py @@ -11,7 +11,6 @@ from tmd.storage import STORAGE_FOLDER from tmd.imputation_assumptions import ( SOI_IITAX_SPEC, - CREDIT_CLAIMING, CPS_FILER_MIN_INCOME, CPS_TAXABLE_INTEREST_FRACTION, CPS_QUALIFIED_DIVIDEND_FRACTION, @@ -359,7 +358,6 @@ def _is_tax_filer(tcdf: pd.DataFrame, taxyear: int) -> pd.Series: ) pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) calc = taxcalc.Calculator(records=rec, policy=pol) calc.advance_to_year(taxyear) calc.calc_all() diff --git a/tmd/imputation_assumptions.py b/tmd/imputation_assumptions.py index 66916bf7..7761a358 100644 --- a/tmd/imputation_assumptions.py +++ b/tmd/imputation_assumptions.py @@ -34,21 +34,9 @@ # parameters used to identify CPS nonfilers: FILER_MIN_INCOME = { 2021: 8600, - 2022: 9300, -} -EITC_CLAIM_THD = { - 2021: 1800, # reduces 2023 EITC from $82.3b to $71.6b, a claim rate of 87% - 2022: 1600, # reduces 2023 EITC from $80.5b to $72.0b, a claim rate of 89% -} -ACTC_CLAIM_THD = { - 2021: 0, # always leave 2021 value at zero - 2022: 1500, + 2022: 9900, } CPS_FILER_MIN_INCOME = FILER_MIN_INCOME[TAXYEAR] -CREDIT_CLAIMING = { - "eitc_claim_thd": {f"{TAXYEAR}": EITC_CLAIM_THD[TAXYEAR]}, - "actc_claim_thd": {f"{TAXYEAR}": ACTC_CLAIM_THD[TAXYEAR]}, -} CPS_WEIGHTS_SCALE = {2021: 1.0, 2022: 1.0} # for scaling CPS nonfiler weights # parameters used in creation of national sampling weights: diff --git a/tmd/utils/soi_replication.py b/tmd/utils/soi_replication.py index 10b5d960..690e3607 100644 --- a/tmd/utils/soi_replication.py +++ b/tmd/utils/soi_replication.py @@ -1,12 +1,11 @@ import pandas as pd import taxcalc -from tmd.imputation_assumptions import SOI_IITAX_SPEC, CREDIT_CLAIMING +from tmd.imputation_assumptions import SOI_IITAX_SPEC def taxcalc_to_soi(puf: pd.DataFrame, year: int) -> pd.DataFrame: pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) rec = taxcalc.Records( data=puf, start_year=year, diff --git a/tmd/utils/taxcalc_output.py b/tmd/utils/taxcalc_output.py index 180dccff..57cb4625 100644 --- a/tmd/utils/taxcalc_output.py +++ b/tmd/utils/taxcalc_output.py @@ -7,7 +7,7 @@ import numpy as np import pandas as pd import taxcalc -from tmd.imputation_assumptions import SOI_IITAX_SPEC, CREDIT_CLAIMING +from tmd.imputation_assumptions import SOI_IITAX_SPEC def add_taxcalc_outputs( @@ -48,7 +48,6 @@ def add_taxcalc_outputs( ) pol = taxcalc.Policy() pol.implement_reform(SOI_IITAX_SPEC) - pol.implement_reform(CREDIT_CLAIMING) if reform: pol.implement_reform(reform) simulation = taxcalc.Calculator(records=rec, policy=pol)