A helper function to read survival data from CSV or Excel files and prepare it for analysis with the Beta-Danish package. It automatically handles missing status columns by assuming all observations are complete (uncensored).
Arguments
- file
Character string specifying the path to the file.
- time_col
Character string specifying the name of the time/survival column.
- status_col
Character string specifying the name of the event/censoring indicator column. If `NULL` (default), the function assumes all observations are uncensored and creates a status column filled with 1s.
- covar_cols
Character vector specifying the names of covariate columns to keep. If `NULL` (default), no covariates are kept.
Value
A clean `data.frame` containing the `time`, `status`, and any specified covariates, ready to be passed to `fit_betadanish()`.