For a given survival dataset and specified cut times, each record is split into multiple subrecords at each cut time. The resulting dataset is in counting process format, with each subrecord containing a start time, stop time, and event status. This is adapted from the survsplit.c function from the survival package.
survsplit(tstart, tstop, cut)
A data frame with the following variables:
row
: The row number of the observation in the input data
(starting from 0).
start
: The starting time of the resulting subrecord.
end
: The ending time of the resulting subrecord.
censor
: Whether the subrecord lies strictly within a record
in the input data (1 for all but the last interval and 0 for the
last interval with cutpoint set equal to tstop).
interval
: The interval number derived from cut (starting
from 0 if the interval lies to the left of the first cutpoint).
The starting time of the time interval for counting-process data.
The stopping time of the time interval for counting-process data.
The vector of cut points.
Kaifeng Lu, kaifenglu@gmail.com
survsplit(15, 60, c(10, 30, 40))
Run the code above in your browser using DataLab