-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Module for using SSA life-tables #906
Conversation
@llorracc @sbenthall we have been discussing how to include data in the toolbox. This would be my proposal:
|
Quick review: Looking pretty good to me! A few possible improvements, from my point of view:
|
This can be done but aggregation would require a couple of assumptions. I'd like the default to be something coming directly from the tables. The literature often just picks male or female rates depending on their purposes. I'll double check with Chris to see what he'd like to be the default.
Added in the last commit.
I can do this but are you sure? Some of them are actuarial quantities that I don't anticipate us ever using. It might just distract people from the main point of the module.
Could you elaborate on the second sentence? |
I discussed what should be the default behavior regarding An issue is that the literature often cites using "Survival probabilities from the SSA" without specifying exactly what year and sex they use. There is also not a clearly predominant approach.
Computing an average or aggregate mortality rate would require one to at least make assumptions about the male/female composition of the population at different times. We believe, in terms of reproducibility and clarity, that it is better to work with the "pure" female/male rates that come directly from the SSA, and let users decide and document how to aggregate them if the so wish. |
https://pypi.org/project/black/ What happens if you run it on your file? (This is something we should all be doing, but are not yet in the habit of doing.) |
roger that. I defer to you. |
Ah! Very cool. I did not know you had a preferred linter. Will keep using it. The last commit uses it on the main script. |
This PR needs a CHANGELOG update to be merged. |
This PR adds a module to construct survival probabilities (in the format HARK expects them) directly from the US SSA life tables.
This allows us to find well-calibrated survival probabilities for ages [0,119] in the period [1900, 2095] (>2017 data are projections).
The module contains:
.csv
format. A nice feature is that they are kept "raw": in the exact form that the SSA distributed them..py
with a function that produces survival probabilities from the tables. You can ask for male or female, any (reasonable) age range, and a historical year or cohort to track.Please ensure your pull request adheres to the following guidelines: