get_cox_risk_set_idx | R Documentation |
This function returns the indices of the risk set for a given time of interest in the Cox proportional hazards model.
get_cox_risk_set_idx(
time_of_interest,
entry_vector,
time_vector,
status_vector
)
time_of_interest |
A numeric value representing the time at which the risk set is calculated. |
entry_vector |
A numeric vector representing the entry times of subjects. |
time_vector |
A numeric vector representing the time-to-event or censoring times of subjects. |
status_vector |
A numeric vector indicating event occurrence (1) or censoring (0) for each subject. |
A vector of indices representing the subjects at risk at the specified time of interest.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.