survcoxlasso_train {survcompare}R Documentation

Trains CoxLasso, using cv.glmnet(s="lambda.min")

Description

Trains CoxLasso, using cv.glmnet(s="lambda.min")

Usage

survcoxlasso_train(
  df_train,
  predict.factors,
  inner_cv = 5,
  fixed_time = NaN,
  retrain_cox = FALSE,
  verbose = FALSE
)

Arguments

df_train

data frame with the data, "time" and "event" should describe survival outcome

predict.factors

list of the column names to be used as predictors

inner_cv

k in k-fold CV for lambda tuning

fixed_time

not used here, for internal use

retrain_cox

whether to re-train coxph on non-zero predictors; FALSE by default

verbose

TRUE/FALSE prints warnings if no predictors in Lasso

Value

fitted CoxPH object with coefficient of CoxLasso or re-trained CoxPH with non-zero CoxLasso if retrain_cox = FALSE or TRUE


[Package survcompare version 0.1.2 Index]