Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions puf_data/StatMatch/Matching/cps_rets.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def create(self, record, house):
else:
agede = 0
# Age related variables
record['nu05'] = 0 # Only checked for dependents
record['nu06'] = 0 # Only checked for dependents
record['nu13'] = 0 # Only checked for dependents
record['nu18_dep'] = 0
record['nu18'] = 0
Expand Down Expand Up @@ -701,8 +701,8 @@ def create(self, record, house):
dage = individual['a_age']
record[('dep' + str(depne))] = house.index(individual)
record['depage' + str(depne)] = dage
if individual['a_age'] < 5:
record['nu05'] += 1
if individual['a_age'] < 6:
record['nu06'] += 1
if individual['a_age'] < 13:
record['nu13'] += 1
if 0 < individual['a_age'] < 18:
Expand Down Expand Up @@ -846,7 +846,7 @@ def convert(self, ix, iy):
self.house_units[ix][dep] = 0
self.house_units[iy][depage] = self.house_units[ix][depagex]
# Add age variables together
self.house_units[iy]['nu05'] += self.house_units[ix]['nu05']
self.house_units[iy]['nu06'] += self.house_units[ix]['nu06']
self.house_units[iy]['nu13'] += self.house_units[ix]['nu13']
self.house_units[iy]['nu18_dep'] += self.house_units[ix]['nu18_dep']
self.house_units[iy]['nu18'] += self.house_units[ix]['nu18']
Expand Down Expand Up @@ -1065,7 +1065,7 @@ def output(self, unit, house):
'returns', 'wt', 'zifdep', 'zntdep', 'zhhinc',
'zagesp', 'zoldes', 'zyoung', 'zworkc', 'zsocse',
'zssinc', 'zpubas', 'zvetbe', 'zfinas', 'zowner',
'zwaspt', 'zwassp', 'wasp', 'wass', 'nu05', 'nu13',
'zwaspt', 'zwassp', 'wasp', 'wass', 'nu06', 'nu13',
'nu18_dep', 'nu18', 'n1820', 'n21',
'elderly_dependents']
for var in repeated_vars:
Expand Down
1 change: 0 additions & 1 deletion tests/puf_agg_expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ k1bx14s -152665141 -7244500 5459500
n1820 21383 0 3
n21 376057 0 10
n24 120826 0 3
nu05 32973 0 4
nu06 40493 0 5
nu13 100113 0 5
nu18 149661 0 6
Expand Down
14 changes: 1 addition & 13 deletions tests/records_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1018,25 +1018,13 @@
"max": 12
}
},
"nu05": {
"type": "int",
"desc": "Number of dependents under 5 years old",
"form": {
"2013-2016": "imputed from CPS data"
},
"availability": "taxdata_puf",
"range": {
"min": 0,
"max": 4
}
},
"nu06": {
"type": "int",
"desc": "Number of dependents under 6 years old",
"form": {
"2013-2016": "imputed from CPS data"
},
"availability": "taxdata_cps",
"availability": "taxdata_puf, taxdata_cps",
"range": {
"min": 0,
"max": 7
Expand Down