Learn R Programming

intccr (version 1.0.0)

Surv2: Creating data frame

Description

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

Usage

Surv2(v, u, 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\).

event

an indicator of cause of failure. If observation is righ-censored, event = 0; otherwise, event = 1 or 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.

Value

data frame

Details

The function Surv2 provides a response data frame which is used in the function ciregic.

Examples

Run this code
# NOT RUN {
attach(simdat)
Surv2(v, u, c)

# }

Run the code above in your browser using DataLab