Split a Survival Data Set at Specified Times
Given a survival data set and a set of specified cut times, the function splits
each record into multiple records at each cut time. The new data
set is be in counting process
format, with a start time, stop
time, and event status for each record. More general than survSplit
as it also works with the data already in the counting process
format.
survsplit(data, cut, end, event, start, id = NULL, zero = 0, episode = NULL,interval=NULL)
data |
data frame. |
cut |
vector of timepoints to cut at. |
end |
character string with name of event time variable. |
event |
character string with name of censoring indicator. |
start |
character string with name of start variable (will be created if it does not exist). |
id |
character string with name of new id variable to create (optional). |
zero |
If |
episode |
character string with name of new episode variable (optional). |
interval |
this argument is used by |
New, longer, data frame.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.