This function censors onset times for family members based on the proband's end of follow-up. This is done to prevent using future events to base predictions on.
censor_family_onsets(
tbl,
proband_id_col,
cur_proband,
start,
end,
event,
status_col = "status",
aod_col = "aod",
age_eof_col = "age"
)
tibble with updated end times, status, age of diagnosis, and age at end of follow-up for a family, such that proband's end time is used as the end time for all family members. This prevents using future events to based predictions on.
tibble with info on family members, censoring events based on cur_proband in proband_id_col, must contain start, end, and event as columns
column name of proband ids within family
current proband id
start of follow up, typically birth date, must be a date column
end of follow up, must be a date column
event of interest, typically date of diagnosis, must be a date column
column name of status column to be created. Defaults to "status.
column name of age of diagnosis (aod) column to be created. Defaults to "aod".
column name of age at end of follow-up (eof) column to be created. Defaults to "age_eof".