View source: R/basic_methods.R
rc_setup | R Documentation |
This function combines two data frames, the recurring-event and terminal-event/competing-risks datasets, into one. Each subject has as many rows in the new data frame as the number of recurrent risk periods plus one for each terminal event/competing risk.
rc_setup(rc_data, trm_data,
idVar = "id", statusVar = "status",
startVar = "start", stopVar = "stop",
trm_censLevel,
nameStrata = "strata", nameStatus = "status")
rc_data |
the data frame containing the recurring-event data with multiple rows per subject. |
trm_data |
the data frame containing the terminal-event/competing-risks data with a single row per subject. |
idVar |
a character string denoting the name of the variable in
|
statusVar |
a character string denoting the name of the variable in
|
startVar |
a character string denoting the name of the variable in
|
stopVar |
a character string denoting the name of the variable in
|
trm_censLevel |
a character string or a scalar denoting the censoring
level in the statusVar variable of |
nameStrata |
a character string denoting the variable that will be added
in the long version of |
nameStatus |
a character string denoting the variable that will be added
in the long version of |
A data frame in the long format with multiple rows per subject.
Pedro Miranda Afonso p.mirandaafonso@erasmusmc.nl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.