diff --git a/docs/book/content/data/puf_file_doc.md b/docs/book/content/data/puf_file_doc.md index 0d44ad0..e2948a6 100644 --- a/docs/book/content/data/puf_file_doc.md +++ b/docs/book/content/data/puf_file_doc.md @@ -17,4 +17,6 @@ Coming soon... ## Final Prep -Coming soon... \ No newline at end of file +### Imputing Pension Contributions + +Target data source: [IRS SOI W-2 statistics](https://www.irs.gov/statistics/soi-tax-stats-individual-information-return-form-w2-statistics) \ No newline at end of file diff --git a/taxdata/cps/pycps.py b/taxdata/cps/pycps.py index d8dd8ef..7b147da 100644 --- a/taxdata/cps/pycps.py +++ b/taxdata/cps/pycps.py @@ -327,13 +327,15 @@ def pycps(cps: list, year: int, ctam_benefits: bool, verbose: bool) -> pd.DataFr Parameters ---------- cps: List where each element is a household in the CPS + year: CPS year to use + ctam_benefits: If true, attach C-TAM benefits to the CPS + verbose """ tax_units = [] - ctam_benefits = True if year not in C_TAM_YEARS and ctam_benefits: raise ValueError(f'C-TAM Benefits not available for year {year}') for hh in tqdm(cps): - tax_units += create_units(hh, year - 1, ctam_benefits=ctam_benefits) + tax_units += create_units(hh, year - 1, ctam_benefits=ctam_benefits, verbose=verbose) # create a DataFrame of tax units with the new tax_units_df = pd.DataFrame(tax_units) diff --git a/taxdata/puf/impute_pencon.py b/taxdata/puf/impute_pencon.py index 488857b..271dfa6 100644 --- a/taxdata/puf/impute_pencon.py +++ b/taxdata/puf/impute_pencon.py @@ -39,16 +39,10 @@ for details. """ from __future__ import print_function -import sys import numpy as np import pandas as pd from pathlib import Path -if sys.version_info[0] < 3: - from StringIO import StringIO -else: - from io import StringIO - CURPATH = Path(__file__).resolve().parent DUMP0 = False @@ -96,7 +90,7 @@ def targets(year): 1e6, 2e6, 5e6, - 30e6, + 124e6, ] @@ -156,7 +150,8 @@ def wage_group(row): # several times each with a different value of HIWAGE_PROB_SF. -# specify maximum legal elective deferral amount for DC pensions in 2011 +# specify maximum legal elective deferral amount for DC pensions in each year +# the PUF is supported MAX_PENCON_AMT = {2011: 16500, 2015: 1800}