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
sl<-sl.time(method=c("aft.gamma", "ph.gompertz"), metric="ibs",
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(sl)
Run the code above in your browser using DataLab