library(survival)
lung$sex <- factor(lung$sex)
vars <- list(
time = "time",
event = "status",
arm = "sex",
biomarker = "age"
)
step_matrix <- fit_survival_step(
variables = vars,
data = lung,
control = c(control_coxph(), control_step(num_points = 10, degree = 2))
)
broom::tidy(step_matrix)
Run the code above in your browser using DataLab