## time to relapse of patients in a clinical trial of 6-MP
## against a placebo (Survival Analysis, Klein and Moeschberger
## (1950) 2nd edition).
x <- c(10,7,32,23,22,6,16,34,32,25,11,20,19,6,17,35,6,13,9,6,10)
w <- c(1,1,0,1,1,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,0)
(out1 <- weighting(x,w,type="rc",method="Nelson"))
(out2 <- weighting(x,w,type="rc",method="Kaplan"))
Run the code above in your browser using DataLab