Create a recurrent event survival object, used as a response variable in reReg. This function is deprecated in Version 1.1.6. A recurrent event object is now being created with Recur(). See '?Recur()' for details.

reSurv(time1, time2, id, event, status, origin = 0)

## Arguments

time1 when "time2" is provided, this vector is treated as the starting time for the gap time between two successive recurrent events. In the absence of "time2", this is the observation time of recurrence on calendar time scale, in which, the time corresponds to the time since entry/inclusion in the study. an optional vector for ending time for the gap time between two successive recurrent events. subject's id. a binary vector used as the recurrent event indicator. event = 1 for recurrent times. a binary vector used as the status indicator for the terminal event. status = 0 for censored times. a numerical vector indicating the time origin of subjects. When origin is a scalar, reSurv assumes all subjects have the same origin. Otherwise, origin needs to be a numerical vector, with length equals to the number of subjects. In this case, each element corresponds to different origins for different subjects. This argument is only needed when "time2" is missing.

## Examples

if (FALSE) {
data(simDat)
## being deprecated in Verson 1.1.7
with(dat, reSurv(Time, id, event, status))