data(dataDIVAT2)
#The outcome model base on a Super Learner from the first 150 individuals of the data base
sl1 <- survivalSL( methods=c("LIB_AFTgamma", "LIB_PHgompertz"), metric="ci",
data=dataDIVAT2[1:150,], times="times", failures="failures", group="ecd",
cov.quanti=c("age"), cov.quali=c("hla", "retransplant"), cv=3)
# The calibration plot from the validation sample of 150 patients
plot(sl1, method="sl", n.groups=5, pro.time=12, col=2,
xlab="Predicted 12-year survival", ylab="Observed 12-year survival",
newdata=dataDIVAT2[151:300,], times="times", failures="failures")
Run the code above in your browser using DataLab