surv_tmerge | R Documentation |
This will take data in long form and create a tmerge dataframe that can be used in time dependent survival analysis
surv_tmerge(data, id, age, age_death, dead_censor, outcomes)
data |
dataframe in long form for outcome measurements |
id |
character string specifying subject in data |
age |
character string specifying age in data |
age_death |
character string specifiying age of death in data |
dead_censor |
character string specifying censor in data. A death is represented by 1 and censorship is represented by 0 |
outcomes |
vector or list of strings specifying the outcome variables at each timepoint |
outputs dataframe with tstart, tstop, death that can be used for time dependent survival analysis
William Mueller
tmerge
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.