Cleans and prepares a single dataset for standard (competing risks) CIF analysis.
prep_data_cif(
data,
ID = "USUBJID",
TimeToRecovery = "TTRECOV",
TimeToDeath = "TTDEATH",
Recov_Censoring = "RECCNSR",
Death_Censoring = "DTHCNSR",
Treatment = "trt"
)A list with:
data.w: The processed data frame with columns cn, etime, estatus, etype2, Treatment.
Treatment: Subset of data.w where Treatment==1.
Control: Subset of data.w where Treatment==0.
A data frame with columns for ID, time to recovery, time to death, recovery censor, death censor, and treatment indicator.
Name of the patient ID column. Default is "USUBJID".
Name of the time-to-recovery column. Default "TTRECOV".
Name of the time-to-death column. Default "TTDEATH".
Name of the recovery-censor column. Default "RECCNSR" (0=event,1=censor).
Name of the death-censor column. Default "DTHCNSR" (0=event,1=censor).
Name of the treatment indicator column (0=control,1=treatment). Default "trt".