powered by
Generalization of the Wilcoxon rank sum which allows for censored data.
gehan.test(time, event, trt)
Value of the test statistic
p-value
Time of event or of censoring
Indicator variable representing a event occur or not (time is censored)
Variable indicating treatment group.
John Kloke
Higgins (2004), Introduction to Modern Nonparametric Statistics, Pacific Grove, CA:Brooks/Cole--Thomson Learning
n<-76 y<-rexp(n) event<-rbinom(n,1,0.7) # about 30% censored trt<-sample(c(0,1),n,replace=TRUE) gehan.test(y,event,trt)
Run the code above in your browser using DataLab