# \donttest{
library(survival)
library(survex)
cph <- coxph(Surv(time, status) ~ ., data = veteran, model = TRUE, x = TRUE, y = TRUE)
cph_exp <- explain(cph)
cph_model_profile_2d <- model_profile_2d(cph_exp,
variables = list(c("age", "celltype"))
)
head(cph_model_profile_2d$result)
plot(cph_model_profile_2d)
cph_model_profile_2d_ale <- model_profile_2d(cph_exp,
variables = list(c("age", "karno")),
type = "accumulated"
)
head(cph_model_profile_2d_ale$result)
plot(cph_model_profile_2d_ale)
# }
Run the code above in your browser using DataLab