The function dataprep
provides a ready-to-use data format that can be directly used in the function ciregic
. The returned data frame consists of id
, v
, u
, c
, and covariates as columns. The v
and u
indicate time window with the last observation time before the event and the first observation after the event. The c
represents a type of event, for example, c = 1
for the first cause of failure, c = 2
for the second cause of failure, and c = 0
for the right-censored. Individuals who have only one time record with right-censored event will be omitted because its time interval is (0, Inf)
, and the lower bound v
will be replaced by zero, for example (0, v]
, if individuals are not right-censored and have only one time record.