survival_prob_partykit | R Documentation |
A wrapper for survival probabilities with partykit models
survival_prob_partykit(
object,
new_data,
eval_time,
time = deprecated(),
output = "surv"
)
object |
A model object from |
new_data |
A data frame to be predicted. |
eval_time |
A vector of times to predict the survival probability. |
time |
Deprecated in favor of |
output |
Type of output. Can be either |
A tibble with a list column of nested tibbles.
library(partykit)
c_tree <- ctree(Surv(time, status) ~ age + ph.ecog, data = lung)
survival_prob_partykit(c_tree, lung[1:3, ], eval_time = 100)
c_forest <- cforest(Surv(time, status) ~ age + ph.ecog, data = lung, ntree = 10)
survival_prob_partykit(c_forest, lung[1:3, ], eval_time = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.