survcox_train {survcompare}R Documentation

Trains CoxPH using survival package, or trains CoxLasso (cv.glmnet, lambda.min), and then re-trains survival:coxph on non-zero predictors

Description

Trains CoxPH using survival package, or trains CoxLasso (cv.glmnet, lambda.min), and then re-trains survival:coxph on non-zero predictors

Usage

survcox_train(
  df_train,
  predict.factors,
  fixed_time = NaN,
  useCoxLasso = FALSE,
  retrain_cox = FALSE,
  inner_cv = 5
)

Arguments

df_train

data, "time" and "event" should describe survival outcome

predict.factors

list of the column names to be used as predictors

fixed_time

target time, NaN by default; needed here only to re-align with other methods

useCoxLasso

TRUE or FALSE

retrain_cox

if useCoxLasso is TRUE, whether to re-train coxph on non-zero predictors, FALSE by default

inner_cv

k in k-fold CV for training lambda for Cox Lasso, only used for useCoxLasso = TRUE

Value

fitted CoxPH or CoxLasso model


[Package survcompare version 0.1.2 Index]