Surv(time, event) Surv(time, time2, event, type=<<see below>>, origin=0) is.Surv(x)
event indicates whether an event
occurred at the end of the interval.
time, 2 = left censored,
and 3 = interval censored.
For left-censored data, the status indicator is T=uncensored, F=censored.
Although unusual, the event indicator can be omitted,
in which case all subjects are assumed to have an event.
"right",
"left",
"counting",
"interval",
or
"interval2".
The default is
"right"
or
"counting"
depending on whether the
time2
argument is absent or present, respectively.
Surv, a matrix of 2 or 3
columns of class
"Surv"
containing
time,
time2
(if provided),
and
status.
is.Surv,
a logical value
T if
x
inherits from class
"Surv"
,
otherwise an
F.
Surv objects can be subscripted either as an object, e.g.
x[1:3]
using a single subscript;
in which case the
drop argument is ignored;
or as a matrix, using two arguments.
If the second subscript is missing and
drop=F,
the result of the subscripting will be a Surv object, e.g.,
x[1:3,,drop=F]
,
otherwise the result will be a matrix (or vector), in accordance with
the default behavior for subscripting matrices.
In theory it is possible to represent interval censored data without a
third column containing the explicit status. Exact, right censored,
left censored and interval censored observation would be represented as
intervals of [a,a], [a, infinity), (-infinity,b], and [a,b)
respectively; each interval is a pair of time points
within which the event is
known to have occurred.
If
type="interval2",
the representation given above is
assumed, with
NA taking the place of infinity.
If
type="interval",
event
must be given.
If
event is
0,
1
, or
2,
the relevant
information is assumed to be contained in
time,
the value in
time2
is ignored, and the second column of the result contains a
placeholder.
Presently, the only methods allowing interval censored data are the
parametric models computed by
survReg,
so the distinction between open and closed intervals
is unimportant.
The distinction is important for counting process data and
the Cox model.
The function tries to distinguish between the use of 0/1 and 1/2 coding for
left and right censored data using
if(max(status)==2)
.
If 1/2 coding is used and all the subjects are censored, it will
guess wrong. Use 0/1 coding in this case.
Surv(leukemia$time, leukemia$status) Surv(heart$start, heart$stop, heart$event)