Given to data frames, one containing event time information (one row per subject) and one containing information on time-dependent covariates, creates piece-wise exponential data (with one split per event time and time at which a TDC changes its value).
split_tdc(formula, event_df, tdc_df, tz_var, id_var = "id",
time_var = "time", status_var = "status", cens_value = 0,
entry_time = 0, ...)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.
Data frame (or similar) containing survival information.
Data frame (or similar) containing information on time-dependent covariates
The time variable in tdc_df indicating time points at
which time-dependent covariate (tdc) was observed.
Needs to be the same name in both data sets.
The ID variable name, identifying subjects.
A character, specifies the column of the event or
censoring time in event_df and the time of measurement for
the time-dependent covariates in tdc_df.
As time_var, but specifies column containing the
event indicator. Can be missing in the tdc_df.
The value that indicates censoring in the
status_var column.
If scalar, the time-point at which the follow up for each observation unit begins. (Eventually, support for subject specific entry time could be supported through this argument).
Further arguments passed to the data.frame method and
eventually to survSplit