Description Usage Arguments Examples
View source: R/split-survival-data.R
Given a data set in standard format with one row per observation unit, transform the data set into interval data, where intervals are specified via breaks. Each observation unit will have as many rows as interval start points that it survived.
1 2 3 4 5 6 7 8 9 | split_info(
data,
time_var = "time",
status_var = "status",
id_var = "id",
breaks = NULL,
right_closed = TRUE,
max_end = FALSE
)
|
data |
Data set from which time and status variables will be extracted. |
time_var |
The variable storing event times. |
status_var |
The variable storing the event indicator. |
id_var |
The variable storing ID variable. Will be created if not in data set. |
breaks |
The time points of the interval borders. |
right_closed |
Logical. If |
max_end |
logical. Should the last interval span until the last observed censoring or event time (if larger than the largest specified cut point). |
1 2 | data(ovarian, package="survival")
split_info(ovarian, futime, fustat, breaks = c(0, 59, 500, 1500))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.