View source: R/proportional_hazards-glmnet.R
survival_time_coxnet | R Documentation |
A wrapper for survival times with coxnet models
survival_time_coxnet(object, new_data, penalty = NULL, multi = FALSE, ...)
object |
A parsnip |
new_data |
Data for prediction. |
penalty |
Penalty value(s). |
multi |
Allow multiple penalty values? |
... |
Options to pass to |
A vector.
cox_mod <- proportional_hazards(penalty = 0.1) %>%
set_engine("glmnet") %>%
fit(Surv(time, status) ~ ., data = lung)
survival_time_coxnet(cox_mod, new_data = lung[1:3, ], penalty = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.