This function combines two data frames, the recurring event and terminal event datasets, into one. Each subject has as many rows in the new data frame as the number of recurrent risk periods plus one for the terminal event.
rc_setup(rc_data, trm_data,
rc_idVar = "id", rc_statusVar = "status",
rc_startVar = "start", rc_stopVar = "stop",
trm_idVar = "id", trm_statusVar = "status",
trm_stopVar = "stop",
nameStrata = "strata", nameStatus = "status")
A data frame in the long format with multiple rows per subject.
the data frame containing the recurring event data with multiple rows per subject.
the data frame containing the terminal event data with a single row per subject.
a character string denoting the name of the variable in
rc_data
that identifies the subject.
a character string denoting the name of the variable in
rc_data
that identifies the status variable which equals 1 if the
subject had an event and 0 otherwise.
a character string denoting the name of the variable in
rc_data
that identifies the starting time for the interval.
a character string denoting the name of the variable in
rc_data
that identifies the stopping time for the interval.
a character string denoting the name of the variable in
trm_data
that identifies the subject.
a character string denoting the name of the variable in
trm_data
that identifies the status variable which equals 1 if the
subject had the event and 0 otherwise.
a character string denoting the name of the variable in
trm_data
that identifies the follow up time.
a character string denoting the variable that will be added
in the long version of data
denoting the various causes of event.
a character string denoting the variable that will be added
in the long version of data
denoting if the subject had an event.
Pedro Miranda Afonso p.mirandaafonso@erasmusmc.nl