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

Add Additional Imputed Benefits #161

Merged
merged 5 commits into from
Mar 7, 2018

Conversation

andersonfrailey
Copy link
Collaborator

This PR adds new variables imputed by C-TAM: WIC, Housing benefits, TANF, and Unemployment insurance. The first three have not previously been in the CPS file, and the imputed unemployment insurance will replace e02300. I've removed housing and unemployment assistance from the benefitprogram.csv file. It also removes the cap on n24 in the CPS file, to address issue #131.

The reason I have labeled this "in progress" is there are two items in benefitprograms.csv that need to be evaluated. Family support payments to States and TANF and Supplemental feeding programs (WIC and CSFP) contain programs that have now been imputed, but also other programs that have not. @Amy-Xu and I have not yet decided what the best way to handle this is yet. One thought is to simply subtract the weighted sum of the imputed TANF and WIC variables from the amount in benefitprograms.csv, but I'd appreciate other opinions if there are any.

@andersonfrailey
Copy link
Collaborator Author

Latest commit removed TANF and WIC from the total other_ben before it is distributed to avoid double counting.

data['e02400'] = data['e02400'].astype(np.int32)
data['e02300'] = data['e02300'].astype(np.int32)
data['e02300'] = data['ui_ben'].astype(np.int32)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andersonfrailey So are we replacing e02300 with the imputed unemployment compensation? In other words, we're using imputed imputed UI for tax calculations as well? I thought it was the other way around but total fine with this if the tax liabilities look ok. @MattHJensen Do you think it's fine to use imputed benefit to replace e02300? Anderson previously checked the total of imputed UI is 93% of e02300.

@@ -203,7 +203,7 @@ def _read_data(self, growth_rates, cps_benefit, cps_weights,
for benefit in benefit_names:

# create benefit targets
benefit_2014 = (cps_benefit[benefit] * cps_benefit.s006).sum()
benefit_2014 = (cps_benefit[benefit] * cps_benefit.WT).sum()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with the previous version of this script, so just want to check: is this a switch from s006 to WT for every year or just a renaming thing? In other words, are these two variables completely equivalent for every year?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. When we create the s006 variable for the final CPS value we're just renaming the WT column. I'm actually still trying to figure out why it could run at all using s006 instead of WT.

@andersonfrailey
Copy link
Collaborator Author

Last commit adds the edits to the SAS scripts I made

@andersonfrailey
Copy link
Collaborator Author

If there are no more comments, I'll merge this at the end of the day.

@andersonfrailey andersonfrailey merged commit 047af82 into PSLmodels:master Mar 7, 2018
@martinholmer
Copy link
Contributor

@andersonfrailey, In PR #161 you added four new benefits (ui, housing, wic, tanf), but removed only two benefits (ui, housing) from the list of other benefits in the cps_data/benefitprograms.csv file.
Why didn't you remove wic and tanf from the list of other benefits? Seems like the current state of affairs involves some double counting of benefits.

@Amy-Xu

@andersonfrailey
Copy link
Collaborator Author

@martinholmer I left in the line items for Supplemental feeding programs (WIC and CSFP) and Family support payments to States and TANF because, while they each contain TANF and WIC, those are not the only programs included in each line item. To account for double counting I subtracted the weighted sum of imputed TANF and WIC benefits from the sum of other_ben before distributing the non-modeled benefits.

@martinholmer
Copy link
Contributor

@andersonfrailey said about PR #161:

I left in the line items for Supplemental feeding programs (WIC and CSFP) and Family support payments to States and TANF because, while they each contain TANF and WIC, those are not the only programs included in each line item. To account for double counting I subtracted the weighted sum of imputed TANF and WIC benefits from the sum of other_ben before distributing the non-modeled benefits.

OK. So, the new CPS data files are all three?
cps.csv.gz
cps_weights.csv.gz
cps_benefits.csv.gz
From which directories in the taxdata repository?

@andersonfrailey
Copy link
Collaborator Author

@martinholmer, only cps.csv.gz in the cps_data directory and cps_benefits.csv.gz in the cps_stage3 directory need to be updated. cps_weights.csv has not changed.

@martinholmer
Copy link
Contributor

@andersonfrailey said:

only cps.csv.gz in the cps_data directory and cps_benefits.csv.gz in the cps_stage3 directory need to be updated. cps_weights.csv has not changed.

Got it! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants