# NOT RUN {
library(survival)
library(recipes)
df <- within(veteran, {
y <- Surv(time, status)
remove(time, status)
})
rec <- recipe(y ~ ., data = df) %>%
role_case(stratum = y)
(res <- resample(rec, model = CoxModel))
summary(res)
# }
Run the code above in your browser using DataLab