R/Statistics_functions.R
cox_univar_fun.RdFits a univariate Cox proportional hazards model for time-to-event data using a categorical predictor. Reports hazard ratios (HR), 95% CI, Wald p-values for 2-category variables, and likelihood ratio test (LRT) results for variables with >2 categories.
cox_univar_fun(data_fun, res_time, res_event, var)A matrix of HRs, CIs, and p-values.
if (FALSE) { # \dontrun{
cox_univar_fun(mydata, "OS_time", "OS_event", "Stage")
} # }