Create a survival object from a timeline style data set. This will almost always be the response variable in a formula.
Surv2(time, event)
a timeline variable, such as age, time from enrollment, date, etc.
the outcome at that time. This can be a 0/1 variable, TRUE/FALSE, or a factor. If the latter, the first level of the factor corresponds to `no event was observed at this time'.
An object of class Surv2
. There are methods for print
,
is.na
and subscripting.
When used in a coxph
or survfit
model,
Surv2 acts as a trigger to internally convert a timeline style data
set into counting process style data, which is then acted on by the
routine.