Given a formula that specifies the status variable of the outcome, this function
extracts the different event types (except for censoring, specified by
censor_code
).
get_event_types(data, formula, censor_code)
Either an object inheriting from data frame or in case of time-dependent covariates a list of data frames (of length 2), where the first data frame contains the time-to-event information and static covariates while the second (and potentially further data frames) contain information on time-dependent covariates and the times at which they have been observed.
A two sided formula with a Surv
object
on the left-hand-side and covariate specification on the right-hand-side (RHS).
The RHS can be an extended formula, which specifies how TDCs should be transformed
using specials concurrent
and cumulative
. The left hand-side can
be in start-stop-notation. This, however, is only used to create left-truncated
data and does not support the full functionality.
Specifies the value of the status variable that indicates censoring.
Often this will be 0
, which is the default.