survIDM: Create a survIDM object

Description Usage Arguments Details Value Author(s) Examples

View source: R/survIDM.R

Description

Creates a "survIDM" object, usually used as a response variable in a model formula.

Usage

1
survIDM(time1, event1, Stime, event, ...)

Arguments

time1

First time or censoring time.

event1

Indicator of the first time; 0 if the first time is censored and 1 otherwise.

Stime

The total time of the process.

event

Censoring indicator of the survival time of the process; 0 if the total time is censored and 1 otherwise.

...

Other options.

Details

Arguments in this function must be introduced in the following order: time1, event1, Stime and event, where time1 and Stime are the sojourn time in the initial state and the total time, respectively. event1 and event denote their corresponding indicator statuses. This function checks the following conditions: (i) the arguments time1 and Stime must be numeric and nonnegative; event1 and event must be 0 or 1 if numeric and TRUE or FALSE if logical. Stime must be greater or equal to argument arguments time1. Stime and time1 must be equal when argument event1 equals 0 or FALSE. Argument event must be equal to 0 or FALSE when argument event1 equals 0 or FALSE. When arguments Stime and time1 are equal and argument event1 equals 1 or TRUE, argument event must be equal to 1 or TRUE.

Value

An object of class "survIDM". "survIDM" objects are implemented as a single dataframe.

Author(s)

Luis Meira-Machado, Marta Sestelo and Gustavo Soutinho.

Examples

1
with(colonIDM, survIDM(time1, event1, Stime, event))

sestelo/idmsurv documentation built on June 29, 2021, 3:04 p.m.