.calc_surv | R Documentation |
calc_cuminc_df
Just a helper function to make things a little cleaner and easier in the
function calc_cuminc_df
.
.calc_surv(data, time, event, type = "right", extend = FALSE)
data |
A data frame or tibble |
time |
Vector of integer event times. For right censored data, this is the follow up time. For interval data, the first argument is the starting time for the interval. |
event |
The status indicator, normally 0=alive, 1=dead. Other choices are TRUE/FALSE (TRUE = death) or 1/2 (2=death). For interval censored data, the status indicator is 0=right censored, 1=event at time, 2=left censored, 3=interval censored. For multiple enpoint data the event variable will be a factor, whose first level is treated as censoring. Although unusual, the event indicator can be omitted, in which case all subjects are assumed to have an event. |
type |
character string specifying the type of censoring. Possible values are "right", "left", "counting", "interval", "interval2" or "mstate". |
extend |
logical value: if TRUE, prints information for all specified times, even if there are no subjects left at the end of the specified times. This is only valid if the times argument is present. |
A tibble
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.