Given a data set in standard format (with one row per subject/observation),
this function adds a column with the specified exposure time points
and a column with respective exposures, created from rng_fun.
This function should usually only be used to create data sets passed
to sim_pexp.
add_tdc(data, tz, rng_fun, ...)
| data | A data set with variables specified in |
|---|---|
| tz | A numeric vector of exposure times (relative to the
beginning of the follow-up time |
| rng_fun | A random number generating function that creates
the time-dependent covariates at time points |
| ... | Currently not used. |