Checks that a dataset contains all required variables for MRCT simulation functions and reports any issues. Required variables include outcome (tte, event), treatment (treat), continuous covariates (age, bm), and factor covariates (male, histology, prior_treat, regA).
validate_mrct_data(df.case, verbose = TRUE)Logical. TRUE if all requirements met, FALSE otherwise (invisibly)
Data frame to validate
Logical. Print detailed validation results. Default: TRUE
The function checks for the following variables:
Outcome: tte (time-to-event), event (0/1 indicator)
Treatment: treat (0/1 indicator)
Continuous: age, bm (biomarker)
Factor: male (0/1), histology, prior_treat (0/1), regA (0/1)
The function also validates variable types and value ranges.
create_dgm_for_mrct for creating DGM from validated data