diff --git a/docs/guide/input_vars.md b/docs/guide/input_vars.md index 401abaa34..f7c49def4 100644 --- a/docs/guide/input_vars.md +++ b/docs/guide/input_vars.md @@ -706,8 +706,8 @@ _IRS Form Location:_ 2013-2016: imputed from CPS data -## `nu06` -_Description_: Number of dependents under 6 years old +## `nu05` +_Description_: Number of dependents under 5 years old _Datatype_: int _Availability_: taxdata_puf, taxdata_cps _IRS Form Location:_ diff --git a/docs/guide/policy_params.md b/docs/guide/policy_params.md index d83d7ae7d..88f36aebc 100644 --- a/docs/guide/policy_params.md +++ b/docs/guide/policy_params.md @@ -14,7 +14,7 @@ are placed in an Other Parameters group at the end of the section. ### Offsets -#### `parameter_indexing_CPI_offset` +#### `CPI_offset` _Description:_ Values are zero before 2017; reforms that introduce indexing with chained CPI would have values around -0.0025 beginning in the year before the first year policy parameters will have values computed with chained CPI. _Notes:_ See April 2013 CBO report entitled 'What Would Be the Effect on the Deficit of Using the Chained CPI to Index Benefit Programs and the Tax Code?', which includes this: 'The chained CPI grows more slowly than the traditional CPI does: an average of about 0.25 percentage points more slowly per year over the past decade.' _Has An Effect When Using:_ _PUF data:_ True _CPS data:_ True @@ -1004,8 +1004,8 @@ _Valid Range:_ min = 0 and max = 1 _Out-of-Range Action:_ error -#### `ACTC_rt_bonus_under6family` -_Description:_ For families with qualifying children under 6 years old, this bonus rate is added to the fraction of earnings (additional child tax credit rate) used in calculating the ACTC. +#### `ACTC_rt_bonus_under5family` +_Description:_ For families with qualifying children under 5 years old, this bonus rate is added to the fraction of earnings (additional child tax credit rate) used in calculating the ACTC. _Has An Effect When Using:_ _PUF data:_ True _CPS data:_ True _Can Be Inflation Indexed:_ False _Is Inflation Indexed:_ False _Value Type:_ float @@ -1088,8 +1088,8 @@ _Valid Range:_ min = 0 and max = 9e+99 _Out-of-Range Action:_ error -#### `CTC_c_under6_bonus` -_Description:_ The maximum amount of child tax credit allowed for each child is increased by this amount for qualifying children under 6 years old. +#### `CTC_c_under5_bonus` +_Description:_ The maximum amount of child tax credit allowed for each child is increased by this amount for qualifying children under 5 years old. _Has An Effect When Using:_ _PUF data:_ True _CPS data:_ True _Can Be Inflation Indexed:_ True _Is Inflation Indexed:_ False _Value Type:_ float @@ -3567,8 +3567,8 @@ _Valid Range:_ min = 0 and max = 9e+99 _Out-of-Range Action:_ error -#### `CTC_new_c_under6_bonus` -_Description:_ The maximum amount of the new refundable child tax credit allowed for each child is increased by this amount for qualifying children under 6 years old. +#### `CTC_new_c_under5_bonus` +_Description:_ The maximum amount of the new refundable child tax credit allowed for each child is increased by this amount for qualifying children under 5 years old. _Has An Effect When Using:_ _PUF data:_ True _CPS data:_ True _Can Be Inflation Indexed:_ True _Is Inflation Indexed:_ False _Value Type:_ float @@ -3952,25 +3952,8 @@ _Valid Range:_ min = 0 and max = 9e+99 _Out-of-Range Action:_ error -#### `UBI_2164` -_Description:_ UBI benefit provided to people 21-64 years of age. -_Has An Effect When Using:_ _PUF data:_ True _CPS data:_ True -_Can Be Inflation Indexed:_ True _Is Inflation Indexed:_ True -_Value Type:_ float -_Known Values:_ -2013: 0.0 -2014: 0.0 -2015: 0.0 -2016: 0.0 -2017: 0.0 -2018: 0.0 -2019: 0.0 -_Valid Range:_ min = 0 and max = 9e+99 -_Out-of-Range Action:_ error - - -#### `UBI_65` -_Description:_ UBI benefit provided to people 65 and over. +#### `UBI_21` +_Description:_ UBI benefit provided to people 21 and over. _Has An Effect When Using:_ _PUF data:_ True _CPS data:_ True _Can Be Inflation Indexed:_ True _Is Inflation Indexed:_ True _Value Type:_ float diff --git a/taxcalc/calcfunctions.py b/taxcalc/calcfunctions.py index dbf3fe469..2e0b2b7e3 100644 --- a/taxcalc/calcfunctions.py +++ b/taxcalc/calcfunctions.py @@ -359,8 +359,7 @@ def SSBenefits(MARS, ymod, e02400, SS_thd50, SS_thd85, @iterate_jit(nopython=True) -def UBI(nu18, n1820, n21, age_head, age_spouse, elderly_dependents, - UBI_u18, UBI_1820, UBI_2164, UBI_65, UBI_ecrt, +def UBI(nu18, n1820, n21, UBI_u18, UBI_1820, UBI_21, UBI_ecrt, ubi, taxable_ubi, nontaxable_ubi): """ Calculates total and taxable Universal Basic Income (UBI) amount. @@ -373,19 +372,11 @@ def UBI(nu18, n1820, n21, age_head, age_spouse, elderly_dependents, n21: Number of people in the tax unit age 21+ - age_head: Age of filer head. - - age_spouse: Age of spouse. - - elderly_dependents: Number of elderly dependents. - UBI_u18: UBI benefit for those under 18 UBI_1820: UBI benefit for those between 18 to 20 - UBI_2164: UBI benefit for those between 21 to 64 - - UBI_65: UBI benefit for those aged 65 or older + UBI_21: UBI benefit for those 21 or more UBI_ecrt: Fraction of UBI benefits that are not included in AGI @@ -397,12 +388,7 @@ def UBI(nu18, n1820, n21, age_head, age_spouse, elderly_dependents, nontaxable_ubi: amount of UBI that is nontaxable """ - # Calculate number of people age 65+ as 1 if head is 65+, plus 1 if spouse - # is 65+, plus number of elderly dependents. - n65 = (age_head >= 65) + (age_spouse >= 65) + elderly_dependents - n2164 = n21 - n65 - assert n2164 >= 0 - ubi = nu18 * UBI_u18 + n1820 * UBI_1820 + n2164 * UBI_2164 + n65 * UBI_65 + ubi = nu18 * UBI_u18 + n1820 * UBI_1820 + n21 * UBI_21 taxable_ubi = ubi * (1. - UBI_ecrt) nontaxable_ubi = ubi - taxable_ubi return ubi, taxable_ubi, nontaxable_ubi diff --git a/taxcalc/parameters.py b/taxcalc/parameters.py index 010402ff0..b0408a164 100644 --- a/taxcalc/parameters.py +++ b/taxcalc/parameters.py @@ -737,4 +737,4 @@ def __getattr__(self, attr): attr[1:], year=list(range(self.start_year, self.end_year + 1)) ) else: - raise AttributeError(f"{attr} not defined.") + raise AttributeError(f"{attr} not definied.") diff --git a/taxcalc/policy.py b/taxcalc/policy.py index 5abf46f14..4b96ac6b2 100644 --- a/taxcalc/policy.py +++ b/taxcalc/policy.py @@ -73,8 +73,7 @@ class instance: Policy 'CTC_c_under5_bonus': 'was renamed CTC_c_under6_bonus.', 'ACTC_rt_bonus_under5family': 'was renamed ACTC_rt_bonus_under6family.', - 'CTC_new_c_under5_bonus': 'was renamed CTC_new_c_under6_bonus.', - 'UBI_21': 'was split into UBI_2164 and UBI_65.' + 'CTC_new_c_under5_bonus': 'was renamed CTC_new_c_under6_bonus.' } # (2) specify which Policy parameters have been redefined recently REDEFINED_PARAMS = {} diff --git a/taxcalc/policy_current_law.json b/taxcalc/policy_current_law.json index a2852b5e8..37e832b83 100644 --- a/taxcalc/policy_current_law.json +++ b/taxcalc/policy_current_law.json @@ -16005,59 +16005,9 @@ "cps": true } }, - "UBI_2164": { - "title": "UBI benefit for those 21 through 64 over", - "description": "UBI benefit provided to people 21-64 years of age.", - "notes": "", - "section_1": "Universal Basic Income", - "section_2": "UBI Benefits", - "indexable": true, - "indexed": true, - "type": "float", - "value": [ - { - "year": 2013, - "value": 0.0 - }, - { - "year": 2014, - "value": 0.0 - }, - { - "year": 2015, - "value": 0.0 - }, - { - "year": 2016, - "value": 0.0 - }, - { - "year": 2017, - "value": 0.0 - }, - { - "year": 2018, - "value": 0.0 - }, - { - "year": 2019, - "value": 0.0 - } - ], - "validators": { - "range": { - "min": 0, - "max": 9e+99 - } - }, - "compatible_data": { - "puf": true, - "cps": true - } - }, - "UBI_65": { - "title": "UBI benefit for those 65 and over", - "description": "UBI benefit provided to people 65 and over.", + "UBI_21": { + "title": "UBI benefit for those 21 and over", + "description": "UBI benefit provided to people 21 and over.", "notes": "", "section_1": "Universal Basic Income", "section_2": "UBI Benefits", diff --git a/taxcalc/reforms/2017_law.json b/taxcalc/reforms/2017_law.json index 6c6ccacda..caeee6f51 100644 --- a/taxcalc/reforms/2017_law.json +++ b/taxcalc/reforms/2017_law.json @@ -121,6 +121,5 @@ "AGI_surtax_thd": {"2017": [9e99, 9e99, 9e99, 9e99, 9e99]}, "UBI_u18": {"2017": 0}, "UBI_1820": {"2017": 0}, - "UBI_2164": {"2017": 0}, - "UBI_65": {"2017": 0} + "UBI_21": {"2017": 0} } diff --git a/taxcalc/tests/test_calculator.py b/taxcalc/tests/test_calculator.py index 09cd24ef4..62c4ba163 100644 --- a/taxcalc/tests/test_calculator.py +++ b/taxcalc/tests/test_calculator.py @@ -623,8 +623,7 @@ def test_distribution_tables(cps_subsample): reform = { 'UBI_u18': {2014: 1000}, 'UBI_1820': {2014: 1000}, - 'UBI_2164': {2014: 1000}, - 'UBI_65': {2014: 1000} + 'UBI_21': {2014: 1000} } pol.implement_reform(reform) assert not pol.parameter_errors @@ -866,7 +865,7 @@ def test_calc_all_benefits_amounts(cps_subsample): Testing how benefits are handled in the calc_all method ''' # set a reform with a positive UBI amount - ubi_ref = {'UBI_2164': {2020: 1000}} + ubi_ref = {'UBI_21': {2020: 1000}} # create baseline calculator pol = Policy() diff --git a/taxcalc/tests/test_compatible_data.py b/taxcalc/tests/test_compatible_data.py index d36487925..e666f8486 100644 --- a/taxcalc/tests/test_compatible_data.py +++ b/taxcalc/tests/test_compatible_data.py @@ -99,8 +99,7 @@ def fixture_reform_xx(): 'ID_BenefitSurtax_crt': 0.1, 'UBI_u18': 1000, 'UBI_1820': 1000, - 'UBI_2164': 1000, - 'UBI_65': 1000, + 'UBI_21': 1000, 'PT_brk7': [1000000, 1000000, 1000000, 1000000, 1000000], 'II_credit_prt': 0.1, 'II_credit': [100, 100, 100, 100, 100],