fit_rpart | R Documentation |
rpart::rpart
and partykit::as.party
First use rpart::rpart
to obtain a tree and then use as.party
to obtain Kaplan-Meier fits.
fit_rpart(
formula,
data,
id.var,
time.var,
event.var,
nfold = 1,
option = list(),
...
)
formula |
formula used by |
data |
data containing all covariates, follow-up time, event indicator and id |
id.var |
see |
time.var |
see |
event.var |
see |
nfold |
number of folds used when fitting survival curves with sample splitting. Default is 1, meaning no sample splitting |
option |
a list containing optional arguments passed to |
... |
ignored |
a pred_surv
class containing fitted survival curves for individuals in data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.