Survcomp {surv2sample}R Documentation

Competing Risks Survival Data Object

Description

Create an object representing right-censored data with competing risks (types of failure).

Usage

Survcomp(time, event)
is.Survcomp(x)

Arguments

time survival times (possibly right-censored).
event the status indicator, 0 = censored, 1 = dead from cause 1, 2 = dead from cause 2,... Successive integers 1,2,... must be used for causes.
x any object.

Details

This is an extension of the standard function Surv of the package survival. Surv allows only death and censoring, while Survcomp handles causes of death.

Value

Survcomp returns a matrix of class "Survcomp" with two columns (survival times, event types) with attribute "ncauses" containing the number of different causes of death (which is max(event)). There is a print method for objects of class "Survcomp", and the function is.Survcomp for testing whether an object is of this class.

Author(s)

David Kraus (http://www.davidkraus.net/)

See Also

cif, Surv

Examples

## bone marrow transplant data
data(bmt1)

## cause of failure printed in brackets
## censored observations have a "+"
print(a <- Survcomp(bmt1$time, bmt1$event))
is.Survcomp(a)
## what's inside
str(a)

[Package surv2sample version 0.1-2 Index]