-
Notifications
You must be signed in to change notification settings - Fork 0
Registration and death #26
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
Conversation
| as.Date(TPP_death_date) - as.Date(last_registration_start_date), | ||
| TRUE ~ as.difftime(NA_real_, units = "days") | ||
| ), | ||
| TPP_death_dereg = case_when( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be an option for if the last registration end date is missing - we should quantify how commonly that happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
| TPP_death_dereg = case_when( | |
| ons_death_dereg_group = case_when( | |
| is.na(last_registration_end_date) & !is.na(ons_death_date) ~ "missing_last_reg_end", |
| TPP_death_dereg = case_when( | |
| TPP_death_dereg_group = case_when( | |
| is.na(last_registration_end_date) & !is.na(TPP_death_date) ~ "missing_last_reg_end", |
| ons_death_reg == 0 ~ "last_reg_same_death", | ||
| ons_death_reg > 0 ~ "last_reg_before_death" | ||
| ), | ||
| ons_death_dereg_group = case_when( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be interesting to have more granularity - can you do this for individual days, say up to 30 days? you probably couldn't release that info, b/c of disclosure but might be more enlightening. You can keep what you have here (for release purposes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created and ONS and TPP new tables with values -31 < x < 31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this analysis I would do it with and without grace period. Perhaps as separate actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, I think you need to restrict to people who have a death during study period.
Also, I would do summary stats with / without grace period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created summary stats
- raw
- inc criteria with grace period
- inc criteria without grace period (dereg_end_date > min_date_death)
No description provided.