Skip to content

Conversation

@alschaffer
Copy link
Contributor

No description provided.

@alschaffer alschaffer self-assigned this Dec 4, 2025
as.Date(TPP_death_date) - as.Date(last_registration_start_date),
TRUE ~ as.difftime(NA_real_, units = "days")
),
TPP_death_dereg = case_when(
Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Added

Suggested change
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",
Suggested change
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(
Copy link
Contributor Author

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).

Copy link
Contributor

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

Copy link
Contributor Author

@alschaffer alschaffer Dec 4, 2025

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?

Copy link
Contributor Author

@alschaffer alschaffer Dec 4, 2025

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.

Copy link
Contributor

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)

@marrpesce marrpesce merged commit 25189a9 into main Dec 5, 2025
1 check passed
@marrpesce marrpesce deleted the registration-and-death branch December 5, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants