Learn R Programming

npsm (version 2.0.0)

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

Description

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

Usage

gehan.test(time, event, trt)

Value

statistic

Value of the test statistic

p.value

p-value

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.

Author

John Kloke

References

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

Examples

Run this code
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