# Gehan-Wilcoxon test in R, using survival and NADA packages library(NADA) cu <- read.table('cu.txt',header=T) # cu.txt includes cu= value, cens=TRUE if censored, and group: 1 or 2 # make sure group is a factor cu$group.f <- as.factor(cu$group) # combine values and censoring info, and 'flip' to right censored cu.cen <- Cen(cu$cu,cu$cens) # print it out cu.cen # summary statistics for each group # n.b. these use dl when the smallest value is censored. cenfit(cu.cen~cu$group) # test equality using Peto-Peto version of Gehan-Wilcoxon # cendiff provides a family of tests, indexed by Rho # rho = 1, the default, provides the Peto-Peto version of GW # this seems to work the best for data with