data(bmt, package="KMsurv")
b1 <- bmt[bmt$group==1, ] # ALL patients
s1 <- Surv(time=b1$t2, event=b1$d3)
mean(s1)
s1 <- Surv(time=c(6,14,21,44,62),event=c(1,1,0,1,1))
mean(s1)
s2 <- Surv(time=c(6,14,21,44,62),event=c(1,1,0,1,0))
mean(s1)Run the code above in your browser using DataLab