survsplit {trtswitch}R Documentation

Split a survival data set at specified cut points

Description

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 survplit.c function from the survival package.

Usage

survsplit(tstart, tstop, cut)

Arguments

tstart

The starting time of the time interval for counting-process data.

tstop

The stopping time of the time interval for counting-process data.

cut

The vector of cut points.

Value

A data frame with the following variables:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


survsplit(15, 60, c(10, 30, 40))


[Package trtswitch version 0.1.2 Index]