Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new growfactors.csv file to implement single-target extrapolation of benefits #2041

Merged
merged 9 commits into from
Aug 10, 2018
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ include taxcalc/consumption.json
include taxcalc/records_variables.json
include taxcalc/cps.csv.gz
include taxcalc/cps_weights.csv.gz
include taxcalc/cps_benefits.csv.gz
22 changes: 20 additions & 2 deletions taxcalc/assumptions/economic_assumptions_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@
"_ASOCSEC": {"2017": [0.0]},
"_ATXPY": {"2017": [0.0]},
"_AUCOMP": {"2017": [0.0]},
"_AWAGE": {"2017": [0.0]}
"_AWAGE": {"2017": [0.0]},
"_ABENOTHER": {"2017": [0.0]},
"_ABENMCARE": {"2017": [0.0]},
"_ABENMCAID": {"2017": [0.0]},
"_ABENSSI": {"2017": [0.0]},
"_ABENSNAP": {"2017": [0.0]},
"_ABENWIC": {"2017": [0.0]},
"_ABENHOUSING": {"2017": [0.0]},
"_ABENTANF": {"2017": [0.0]},
"_ABENVET": {"2017": [0.0]}
},
"growdiff_response": {
"_ABOOK": {"2017": [0.0]},
Expand All @@ -59,7 +68,16 @@
"_ASOCSEC": {"2017": [0.0]},
"_ATXPY": {"2017": [0.0]},
"_AUCOMP": {"2017": [0.0]},
"_AWAGE": {"2017": [0.0]}
"_AWAGE": {"2017": [0.0]},
"_ABENOTHER": {"2017": [0.0]},
"_ABENMCARE": {"2017": [0.0]},
"_ABENMCAID": {"2017": [0.0]},
"_ABENSSI": {"2017": [0.0]},
"_ABENSNAP": {"2017": [0.0]},
"_ABENWIC": {"2017": [0.0]},
"_ABENHOUSING": {"2017": [0.0]},
"_ABENTANF": {"2017": [0.0]},
"_ABENVET": {"2017": [0.0]}
},
"growmodel": {
"_active": {"2017": [false]}
Expand Down
Binary file removed taxcalc/cps_benefits.csv.gz
Binary file not shown.
178 changes: 178 additions & 0 deletions taxcalc/growdiff.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,183 @@
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},

"_ABENOTHER": {
"long_name": "ABENOTHER additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENOTHER extrapolates input variable other_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},

"_ABENMCARE": {
"long_name": "ABENMCARE additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENMCARE extrapolates input variable mcare_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},


"_ABENMCAID": {
"long_name": "ABENMCAID additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENMCAID extrapolates input variable mcaid_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},


"_ABENSSI": {
"long_name": "ABENSSI additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENSSI extrapolates input variable ssi_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},


"_ABENSNAP": {
"long_name": "ABENSNAP additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENSNAP extrapolates input variable snap_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},


"_ABENWIC": {
"long_name": "ABENWIC additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENWIC extrapolates input variable wic_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},


"_ABENHOUSING": {
"long_name": "ABENHOUSING additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENHOUSING extrapolates input variable housing_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},


"_ABENTANF": {
"long_name": "ABENTANF additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENTANF extrapolates input variable tanf_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
},

"_ABENVET": {
"long_name": "ABENVET additive difference from default projection",
"description": "Default projection is in growfactors.csv file. ABENVET extrapolates input variable vet_ben.",
"section_1": "",
"section_2": "",
"notes": "",
"row_var": "FLPDYR",
"row_label": ["2013"],
"start_year": 2013,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "",
"col_label": "",
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {"min": -1, "max": 1}
}

}
9 changes: 9 additions & 0 deletions taxcalc/growdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,12 @@ def apply_to(self, growfactors):
growfactors.update('ATXPY', cyr, self._ATXPY[i])
growfactors.update('AUCOMP', cyr, self._AUCOMP[i])
growfactors.update('AWAGE', cyr, self._AWAGE[i])
growfactors.update('ABENOTHER', cyr, self._ABENOTHER[i])
growfactors.update('ABENMCARE', cyr, self._ABENMCARE[i])
growfactors.update('ABENMCAID', cyr, self._ABENMCAID[i])
growfactors.update('ABENSSI', cyr, self._ABENSSI[i])
growfactors.update('ABENSNAP', cyr, self._ABENSNAP[i])
growfactors.update('ABENWIC', cyr, self._ABENWIC[i])
growfactors.update('ABENHOUSING', cyr, self._ABENHOUSING[i])
growfactors.update('ABENTANF', cyr, self._ABENTANF[i])
growfactors.update('ABENVET', cyr, self._ABENVET[i])
36 changes: 18 additions & 18 deletions taxcalc/growfactors.csv
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS,ACGNS,ASOCSEC,AUCOMP,AIPD,ABENEFITS
2011,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
2012,1.043862,0.950283,1.104992,1.0209,1.0365,1.032649,1.049023,0.956138,1.165922,0.926962,0.923588,1.327776,1.58966,1.02827,0.7711,0.9231,0.992359
2013,1.012518,1.142179,1.033784,1.014791,1.024602,1.019984,0.99505,1.050098,0.997245,1.013128,0.893658,0.819381,0.776217,1.014786,0.728829,0.896219,0.992515
2014,1.029476,0.931683,0.976566,1.015927,0.964218,1.039999,1.040616,1.030349,1.075978,0.991321,0.925886,1.17606,1.387522,1.004801,0.641103,0.970506,0.99257
2015,1.043858,0.508206,0.999544,1.001235,1.010449,1.042272,1.045643,1.045687,0.999528,0.999533,0.992874,1.157209,1.268161,1.015868,0.910908,1.052061,1.053858
2016,1.027314,0.689296,0.990701,1.012621,1.01353,1.03404,1.031041,1.031132,0.990745,0.990685,1.000698,0.989028,0.889463,1.005343,0.782145,1.035752,1.097065
2017,1.033861,0.813631,0.995785,1.022585,1.025269,1.037738,1.041126,1.041095,0.995835,0.995814,1.031828,1.012056,1.101495,1.005072,0.996884,1.042176,1.011911
2018,1.037313,1.48793,0.993846,1.022361,1.012742,1.036076,1.025419,1.025377,0.993871,0.993912,1.036421,1.043694,1.025287,1.024288,0.977335,1.045734,1.103035
2019,1.035569,1.296752,1.001475,1.023127,1.013316,1.030217,1.023213,1.023267,1.001456,1.001478,1.063017,1.034493,0.993445,1.037255,1.082367,1.043838,1.054052
2020,1.034169,1.205152,1.006471,1.023743,1.013866,1.026805,1.021165,1.021158,1.006439,1.006348,1.081241,1.024377,1.017719,1.035877,1.18212,1.042299,0.996727
2021,1.035865,1.16783,1.012885,1.02439,1.014213,1.028412,1.025171,1.025174,1.012827,1.01294,1.090913,1.019573,1.023735,1.033631,1.113125,1.04386,1.03007
2022,1.035881,1.107286,1.019598,1.023726,1.014102,1.030728,1.02925,1.02929,1.019656,1.019575,1.072062,1.019234,1.027913,1.034139,1.064851,1.043771,1.030159
2023,1.035254,1.063374,1.028614,1.023992,1.01434,1.031473,1.031689,1.031633,1.028548,1.028594,1.058859,1.019495,1.029178,1.035356,1.051938,1.043174,1.030193
2024,1.035337,1.048499,1.030505,1.023749,1.014395,1.031564,1.032954,1.032966,1.030531,1.030529,1.048357,1.023404,1.030403,1.036368,1.043358,1.043084,1.030334
2025,1.034629,1.044463,1.030914,1.023898,1.014528,1.031933,1.033635,1.033618,1.030967,1.030889,1.040376,1.026049,1.031554,1.034024,1.043478,1.042117,1.030635
2026,1.036122,1.016269,1.033285,1.023949,1.014736,1.032043,1.033896,1.033848,1.03325,1.033314,1.040659,1.028251,1.032329,1.035647,1.043508,1.043536,1.030633
2027,1.0358,0.99068,1.032812,1.024131,1.015015,1.032291,1.034216,1.034262,1.03286,1.032865,1.039756,1.030999,1.032011,1.03812,1.034414,1.04314,1.030788
YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS,ACGNS,ASOCSEC,AUCOMP,AIPD,ABENOTHER,ABENMCARE,ABENMCAID,ABENSSI,ABENSNAP,ABENWIC,ABENHOUSING,ABENTANF,ABENVET
2011,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
2012,1.043862,0.950283,1.104992,1.0209,1.0365,1.032649,1.049023,0.956138,1.165922,0.926962,0.923588,1.327776,1.58966,1.02827,0.7711,0.9231,0.992359,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
2013,1.012518,1.142179,1.033784,1.014791,1.024602,1.019984,0.99505,1.050098,0.997245,1.013128,0.893658,0.819381,0.776217,1.014786,0.728829,0.896219,0.992515,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
2014,1.029476,0.931683,0.976566,1.015927,0.964218,1.039999,1.040616,1.030349,1.075978,0.991321,0.925886,1.17606,1.387522,1.004801,0.641103,0.970506,0.99257,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
2015,1.043858,0.508206,0.999544,1.001235,1.010449,1.042272,1.045643,1.045687,0.999528,0.999533,0.992874,1.157209,1.268161,1.015868,0.910908,1.052061,1.053858,1.023325,1.041528,1.019361,1.102667,1.007792,1.026748,1.132657,1.04693
2016,1.027314,0.689296,0.990701,1.012621,1.01353,1.03404,1.031041,1.031132,0.990745,0.990685,1.000698,0.989028,0.889463,1.005343,0.782145,1.035752,1.097065,1.011695,1.010367,0.993375,0.989722,1.002577,1.01625,0.828168,1.105413
2017,1.033861,0.813631,0.995785,1.022585,1.025269,1.037738,1.041126,1.041095,0.995835,0.995814,1.031828,1.012056,1.101495,1.005072,0.996884,1.042176,1.011911,1.030968,1.014601,0.981621,1.0,0.998715,1.063959,1.0,1.0
2018,1.037313,1.48793,0.993846,1.022361,1.012742,1.036076,1.025419,1.025377,0.993871,0.993912,1.036421,1.043694,1.025287,1.024288,0.977335,1.045734,1.103035,1.045097,1.045897,1.005738,1.0,1.002574,1.034828,1.0,1.0
2019,1.035569,1.296752,1.001475,1.023127,1.013316,1.030217,1.023213,1.023267,1.001456,1.001478,1.063017,1.034493,0.993445,1.037255,1.082367,1.043838,1.054052,1.052158,1.045866,1.000751,1.0,1.002567,1.034809,1.0,1.0
2020,1.034169,1.205152,1.006471,1.023743,1.013866,1.026805,1.021165,1.021158,1.006439,1.006348,1.081241,1.024377,1.017719,1.035877,1.18212,1.042299,0.996727,1.050763,1.046106,1.00255,1.0,1.003841,1.034974,1.0,1.0
2021,1.035865,1.16783,1.012885,1.02439,1.014213,1.028412,1.025171,1.025174,1.012827,1.01294,1.090913,1.019573,1.023735,1.033631,1.113125,1.04386,1.03007,1.047248,1.047927,1.001796,1.0,1.002551,1.034869,1.0,1.0
2022,1.035881,1.107286,1.019598,1.023726,1.014102,1.030728,1.02925,1.02929,1.019656,1.019575,1.072062,1.019234,1.027913,1.034139,1.064851,1.043771,1.030159,1.048769,1.047573,0.999851,1.0,1.002545,1.034942,1.0,1.0
2023,1.035254,1.063374,1.028614,1.023992,1.01434,1.031473,1.031689,1.031633,1.028548,1.028594,1.058859,1.019495,1.029178,1.035356,1.051938,1.043174,1.030193,1.050822,1.048715,1.000448,1.0,1.003807,1.034968,1.0,1.0
2024,1.035337,1.048499,1.030505,1.023749,1.014395,1.031564,1.032954,1.032966,1.030531,1.030529,1.048357,1.023404,1.030403,1.036368,1.043358,1.043084,1.030334,1.048426,1.051767,0.99776,1.0,1.002528,1.034951,1.0,1.0
2025,1.034629,1.044463,1.030914,1.023898,1.014528,1.031933,1.033635,1.033618,1.030967,1.030889,1.040376,1.026049,1.031554,1.034024,1.043478,1.042117,1.030635,1.046248,1.052213,1.002245,1.0,1.003783,1.034897,1.0,1.0
2026,1.036122,1.016269,1.033285,1.023949,1.014736,1.032043,1.033896,1.033848,1.03325,1.033314,1.040659,1.028251,1.032329,1.035647,1.043508,1.043536,1.030633,1.072236,1.0,0.999552,1.0,1.002513,1.034808,1.0,1.0
2027,1.0358,0.99068,1.032812,1.024131,1.015015,1.032291,1.034216,1.034262,1.03286,1.032865,1.039756,1.030999,1.032011,1.03812,1.034414,1.04314,1.030788,1.0,1.0,1.0,1.0,1.002506,1.034863,1.0,1.0
5 changes: 4 additions & 1 deletion taxcalc/growfactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ class instance: GrowFactors
'ADIVS', 'AINTS',
'AIPD', 'ASCHCI', 'ASCHCL',
'ASCHEI', 'ASCHEL', 'ASCHF',
'ASOCSEC', 'ATXPY', 'AUCOMP', 'AWAGE', 'ABENEFITS'])
'ASOCSEC', 'ATXPY', 'AUCOMP', 'AWAGE',
'ABENOTHER', 'ABENMCARE', 'ABENMCAID',
'ABENSSI', 'ABENSNAP', 'ABENWIC',
'ABENHOUSING', 'ABENTANF', 'ABENVET'])

def __init__(self, growfactors_filename=FILE_PATH):
# read grow factors from specified growfactors_filename
Expand Down
Loading