Description Usage Arguments Value Examples
View source: R/calculate_at_risk.R
Given survival times and a sequence of (possibly more granular) times, calculate how many is at risk at any given time. An individual is at risk at time t if it has survival time >= t.
1 | calculate_at_risk(times, survival_times)
|
times |
Vector of time points |
survival_times |
Survival times (possibly censored) |
at_risk
Vector of number of individuals at risk at each time in the original times.
1 | R code here showing how your function works
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.