Surv2 {intccr}R Documentation

Creating data frame

Description

The function Surv2 generates the survival object to be treated as the response from ciregic.

Usage

Surv2(v, u, w = NULL, sub = NULL, event)

Arguments

v

the last observation time prior to the failure; 0\le v \le u

u

the first observation time after the failure; u \ge 0

w

a left truncation time or delayed entry time. The default setting is w = NULL for non left-truncated data.

sub

an indicator variable in the data set. It is an optional argument for interval-censored competing risks data and missing cause of failure, and the default is NULL. sub = 1 for the observations that are subject to missingness and sub = 0 elsewhere.

event

an indicator of cause of failure. If an observation is righ-censored, event = 0; otherwise, event = 1 or event = 2, where 1 represents the first cause of failure, and 2 represents the second cause of failure. The current version of package only allows for two causes of failure.

Details

The function Surv2 provides a response data frame which is used in the function ciregic and ciregic_lt. For interval-censored competing risks data, the function Surv2 must use three parameters (v, u, c). For left-truncated and interval censored competing risks data, the function Surv2 must use four parameters (v, u, w, c). If data are partially left-truncated, but all interval-censored, w = 0 for only interval-censored competing risks data.

Value

data frame

Author(s)

Jun Park, jun.park@alumni.iu.edu

Giorgos Bakoyannis, gbakogia@iu.edu

Examples

attach(simdata)
Surv2(v = v, u = u, event = c)
attach(simdata_lt)
Surv2(v = v, u = u, w = w, event = c)


[Package intccr version 3.0.4 Index]