add_tdc {pammtools} | R Documentation |
Add time-dependent covariate to a data set
Description
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
.
Usage
add_tdc(data, tz, rng_fun, ...)
Arguments
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. |
[Package pammtools version 0.5.93 Index]