This function calculates the risk and failure sets for subjects in a Cox proportional hazards model based on their time-to-event data, status, and an indicator vector.
get_cox_risk_and_failure_sets(time_vector, status_vector, indicator_vector)
A list containing two elements:
risk_set
: A matrix indicating which subjects are at risk at each time point.
failure_set
: A matrix indicating which subjects experienced an event at each time point.
A numeric vector of time-to-event data for each subject.
A numeric vector indicating event occurrence (1 = event, 0 = censored).
A numeric vector representing the indicator times used to define risk and failure sets.