data(dataDIVAT2)
res.km <- ipw.survival(times=dataDIVAT2$times, failures=dataDIVAT2$failures,
variable=dataDIVAT2$ecd, weights=NULL)
plot(res.km, ylab="Graft and patient survival",
xlab="Time post-transplantation (years)", col=c(1,2), grid.lty=1)
Run the code above in your browser using DataLab