Introduction

We apply the package stackBagg to a data set The Bone Marrow Transplant Data (bmt) which is in the package timereg . Bone marrow transplants are a standard treatment for acute leukemia. In the recovery process patients can suffer from Infections, toxicity, and (after allogeneic HSCT only), graft-vs.-host disease (GVHD) being the main causes of death. We are interested in predicting the time to death related to treatment where the risk of relapse is a competing risk.

Setup

We load the package stackBagg and timereg and we load the data set bmt

Let’s define the library of algorithms:

We set the covariates that we include in the models:

Now, we are ready to predict the outcome of interest using all the algorithms:

The assessment of predictive performance using the IPCW AUC is:

Now let s take a look at prediction of the algorithms that allows for weights natively:

and their performance is:

The prediction of the survival based methods

Lastly, we could see the performance of the algorithms if we were to discard the censored observations

The ROC curve of the stack is

stackBagg::plot_roc(time=bmt.test$time,delta = bmt.test$cause,marker =pred.bmt$prediction_ensBagg[,"Stack"],wts=pred.bmt$wts_test,tao=7,method = "ipcw")

The Random Forest ROC curve is

stackBagg::plot_roc(time=bmt.test$time,delta = bmt.test$cause,marker =pred.bmt$prediction_ensBagg[,"ens.randomForest"],wts=pred.bmt$wts_test,tao=7,method = "ipcw")

The Random Forest survival ROC curve is

stackBagg::plot_roc(time=bmt.test$time,delta = bmt.test$cause,marker =pred.bmt$prediction_survival[,"Random Forest"],wts=pred.bmt$wts_test,tao=7,method = "ipcw")

The Random Forest natively weighted ROC curve is

stackBagg::plot_roc(time=bmt.test$time,delta = bmt.test$cause,marker =pred.bmt$prediction_native_weights[,"ens.randomForest"],wts=pred.bmt$wts_test,tao=7,method = "ipcw")

The Random Forest discarding censored observations

stackBagg::plot_roc(time=bmt.test$time,delta = bmt.test$cause,marker =pred.discard$prediction_discard[,"ens.randomForest"],tao=7,method = "discard")

#> NULL