Fits an honest generalized random survival forest using
grf::survival_forest() and returns conditional survival curves.
Usage
surv.grf(
time,
event,
X,
newdata = NULL,
new.times,
obsWeights = NULL,
id = NULL,
num.trees = 1000L,
mtry = NULL,
min.node.size = 15L,
honesty = TRUE,
prediction.type = c("Kaplan-Meier", "Nelson-Aalen"),
seed = 1L,
...
)Arguments
- time
Observed follow-up time.
- event
Observed event indicator.
- X
Training covariate data frame.
- newdata
Covariate data frame used for prediction.
- new.times
Times at which survival probabilities are requested.
- obsWeights
Optional non-negative observation weights.
- id
Currently ignored.
- num.trees
Number of trees.
- mtry
Number of candidate variables considered at each split.
- min.node.size
Minimum terminal-node size.
- honesty
Whether to use honest sample splitting.
- prediction.type
Either
"Kaplan-Meier"or"Nelson-Aalen".- seed
Integer random seed passed to
grf.- ...
Additional arguments passed to
grf::survival_forest().
