data(dataDIVAT2)
dataDIVAT2$train <- 1*rbinom(n=dim(dataDIVAT2)[1], size = 1, prob=1/2)
# The training of the super learner with 2 algorithms from the
# first 100 patients of the training sample
sl1 <- survivalSL(method=c("LIB_AFTgamma", "LIB_PHgompertz"), metric="auc",
data=dataDIVAT2[dataDIVAT2$train==1,][1:100,], times="times", failures="failures",
pro.time = 12, cov.quanti=c("age"), cov.quali=c("hla", "retransplant", "ecd"),
cv=3)
# The prognostic capacities from the same training sample
summary(sl1)
Run the code above in your browser using DataLab