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

Various age fields include end points when names and documentation indicate otherwise #164

Closed
MaxGhenis opened this issue Mar 3, 2018 · 6 comments
Labels

Comments

@MaxGhenis
Copy link
Contributor

Documentation and variable name structure for various age fields indicate they should not include the end point. I see four contradictions in the code on this front:

  • nu05 includes 5-year-olds based on the finalprep.py code.
  • nu13 includes 13-year-olds based on the finalprep.py code
  • elderly_dependent is described as "over 65 years old" in the documentation, but includes 65-year-olds based on the finalprep.py code. As an aside, it would be helpful if the user documentation specified the age threshold for this variable.
  • n24 has a related issue: only children under age 17 are eligible for the CTC, but finalprep.py includes 17-year-olds in n24.

n24 aside, I'm not sure if these are used elsewhere, and how that affects whether the variable names or the logic should be changed.

Relevant links:

@MaxGhenis
Copy link
Contributor Author

MaxGhenis commented Mar 3, 2018

A process tweak that could help avoid this is to use exclusively either </> or <=/>= in code. finalprep.py includes endpoints for these variables, but just below them it doesn't with the f2441 and EIC variables (both defined correctly).

@martinholmer
Copy link
Contributor

@andersonfrailey,
Where do we stand on correcting these bugs in the age variables in the cps.csv file?
Are the same kind of errors also present in the puf.csv file?

@MattHJensen @MaxGhenis

@andersonfrailey
Copy link
Collaborator

I'll put together a PR to address these issues today. In the PUF nu13 and nu05 include dependents age 13 and 5, so that will need to be updated.

@andersonfrailey
Copy link
Collaborator

@MaxGhenis, where in the documentation did you see elderly_dependent described as "over 65 years old"?

@MaxGhenis
Copy link
Contributor Author

We then count the number of dependents under 5 and 13 or over 65 years old.

From https://github.com/open-source-economics/taxdata/blob/master/cps_data/cps_file_doc.md

@martinholmer
Copy link
Contributor

@MaxGhenis, Thanks for pointing out these bugs in the generation of the CPS age variables.
These problems have been fixed in pull request #172.

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

No branches or pull requests

3 participants