gehan.test: Gehan generalization the Wilcoxon two-sample test

Description Usage Arguments Value Author(s) References Examples

View source: R/gehan.test.r

Description

Generalization of the Wilcoxon rank sum which allows for censored data.

Usage

1
 gehan.test(time, event, trt) 

Arguments

time

Time of event or of censoring

event

Indicator variable representing a event occur or not (time is censored)

trt

Variable indicating treatment group.

Value

statistic

Value of the test statistic

p.value

p-value

Author(s)

John Kloke [email protected]

References

Higgins (2004), Introduction to Modern Nonparametric Statistics, Pacific Grove, CA:Brooks/Cole–Thomson Learning

Examples

1
2
3
4
5
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)

Example output

Loading required package: Rfit
statistic =  -0.6733782 , p-value =  0.5007067 

npsm documentation built on May 29, 2017, 12:12 p.m.