The function expects a multi-state survival expression or variable as
the left hand side of the formula, e.g. Surv(atime, astat)
where astat
is a factor whose first level represents censoring
and remaining levels are states. The output data set will contain simple
survival data (status = 0 or 1) for a single endpoint of interest.
In the output data set subjects who did not experience the event of
interest become censored subjects
whose times are artificially extended over multiple intervals, with a
decreasing case weight from interval to interval.
The output data set will normally contain many more rows than the
input.
Time dependent covariates are allowed, but not (currently) delayed
entry. If there are time dependent covariates, e.g.., the input data
set had Surv(entry, exit, stat)
as the left hand side, then
an id
statement is required. The program does data checks
in this case, and needs to know which rows belong to each subject.
The output data set will often have gaps. Say that there were events
at time 50 and 100 (and none between) and censoring at 60, 70, and 80.
Formally, a non event subjects at risk from 50 to 100 will have
different weights in each of
the 3 intervals 50-60, 60-70, and 80-100, but because the middle
interval does not span any event times the subsequent Cox model will
never use that row. The finegray
output omits such rows.
See the competing risks vignette for more details.