Combines censoring and absorbing variables to determine the min of their occurrence and labels for Sankeys. Converts filter variables if they are not factors.
setup_cohort( cohort, id_var, censor_vars, absorbing_vars, index_var, filt_vars, final_stage, weight )
String. Variable name of the id/grouping variable.
Character vector. Variable names in cohort that indicate censoring date/day.
sankey_list_maker will use the minimum. If
weight = FALSE the Sankey will use the names of the vector to
label the states shown. If unnamed will group together under "Censored".
Named character vector. Variables in cohort that indicate date/day of states that members cannot transition out of. Names of the vector will be names of the states shown in the Sankey.
cohort_file date or day variable name per subject when event ordering should begin.
All variables that are wanted for filtering.
Last timepoint for the Sankeys
Logical. Should Sankey transitions be weighted? Default is FALSE.
tibble with information necessary for Sankey setup.