Trains CoxPH using survival package, or trains CoxLasso (cv.glmnet, lambda.min), and then re-trains survival:coxph on non-zero predictors
survcox_train(
df_train,
predict.factors,
fixed_time = NaN,
useCoxLasso = FALSE,
retrain_cox = FALSE,
inner_cv = 5
)
fitted CoxPH or CoxLasso model
data, "time" and "event" should describe survival outcome
list of the column names to be used as predictors
target time, NaN by default; needed here only to re-align with other methods
TRUE or FALSE
if useCoxLasso is TRUE, whether to re-train coxph on non-zero predictors, FALSE by default
k in k-fold CV for training lambda for Cox Lasso, only used for useCoxLasso = TRUE