Skip to contents

Create an S4 class that represents formula response for recurrent event data modeled by methods based on counts and rate function. Note that the function is deprecated since version 0.5.0 and will be removed in future.

Usage

Survr(ID, time, event, origin = 0, check = TRUE, ...)

Arguments

ID

Subject identificators. It can be numeric vector, character vector, or a factor vector.

time

Time of reccurence event or censoring. In addition to numeric values, Date and difftime are supported and converted to numeric values.

event

A numeric vector indicating failure cost or event indicator taking positive values as costs (1 as events), and non-positive values as censoring. Logical vector is allowed and will be converted to numeric vector.

origin

The time origin of each subject or process. In addition to numeric values, Date and difftime are also supported and converted to numeric values. Different subjects may have different origins. However, one subject must have the same origin.

check

A logical value suggesting whether to perform data checking procedure. The default value is TRUE. FALSE should be set with caution and only for processed data already in recerruent event data framework.

...

Other arguments for future usage.

Details

This is a similar function to Survr in package survrec but with a more considerate checking procedure embedded for recurrent event data modeled by methods based on counts and rate function. The checking rules apply to each subject respectively and include that

  • Subject identification, event times, censoring time, and event indicator cannot be missing or contain missing values.

  • There has to be only one censoring time not earlier than any event time.

  • The time origin has to be the same and not later than any event time.