Description Usage Arguments Value
View source: R/tdc_functions.R
Attempt to describe a time dependent covariate (tdc).
survival::tmerge
creates time periods (per patient) starting at
'tstart' and ending at 'tstop'. This function calculates a statistic at each
time point of interest (set of all distinct time points starting or ending
an interval). For each such point, the values of a tdc is gathered to
calculate a statistic (determined by argument 'stat').
1 |
x |
data frame with time periods starting at tstart, ending at tstop. |
var |
name of variable of interest |
stat |
function to calculate stat. Note: can return a vector |
stat.names |
names of columns created, if set to NULL, the function will provide them |
tstart |
name of variable acting as tstart |
tstop |
name of variable acting as tstop |
a data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.