Ensemble survival models
The random forest package randomForestSRC
will continue to be useful for creating the random forests associated with the survival data. In fact, the S
of SRC
in the package name stands for survival! The usage of the rfsrc
function remains the same as in previous chapters, and we will now give it a Surv
object, as shown in the following code:
> pbc_rf <- rfsrc(Surv(time,status==2)~trt + age + sex + ascites + + hepato + spiders + edema + bili + chol + albumin+ + copper + alk.phos + ast +trig + platelet + protime+ + stage, ntree=500, tree.err = TRUE, pbc)
We will find some of the basic settings that have gone into setting up this random forest:
> pbc_rf$splitrule [1] "logrankCR" > pbc_rf$nodesize [1] 6 > pbc_rf$mtry [1] 5
Thus, the splitting criteria is based on the log-rank test, the minimum number of observations in a terminal node is six, and the number of variables considered at random for each...