gehan.wilcoxon {ANSM5}R Documentation

Perform Gehan-Wilcoxon test

Description

gehan.wilcoxon() performs the Gehan-Wilcoxon test and is used in chapter 9 of "Applied Nonparametric Statistical Methods" (5th edition)

Usage

gehan.wilcoxon(
  x,
  y,
  x.c,
  y.c,
  alternative = c("two.sided", "less", "greater"),
  max.exact.perms = 1e+05,
  nsims.mc = 1e+05,
  seed = NULL,
  do.asymp = FALSE,
  do.exact = TRUE
)

Arguments

x

Numeric vector of same length as y, x.c, y.c

y

Numeric vector of same length as x, x.c, y.c

x.c

Binary vector of same length as x, y, x.c

y.c

Binary vector of same length as x, y, y.c

alternative

Type of alternative hypothesis (defaults to two.sided)

max.exact.perms

Maximum number of permutations allowed for exact calculations (defaults to 100000)

nsims.mc

Number of Monte Carlo simulations to be performed (defaults to 100000)

seed

Random number seed to be used for Monte Carlo simulations (defaults to NULL)

do.asymp

Boolean indicating whether or not to perform asymptotic calculations (defaults to FALSE)

do.exact

Boolean indicating whether or not to perform exact calculations (defaults to TRUE)

Value

An ANSMtest object with the results from applying the function

Examples

# Example 9.1 from "Applied Nonparametric Statistical Methods" (5th edition)
gehan.wilcoxon(ch9$symp.survtime, ch9$asymp.survtime,
  ch9$symp.censor, ch9$asymp.censor, alternative = "less",
  do.exact = FALSE, do.asymp = TRUE)

# Exercise 9.5 from "Applied Nonparametric Statistical Methods" (5th edition)
gehan.wilcoxon(ch9$regimeA.survtime, ch9$regimeB.survtime,
  ch9$regimeA.censor, ch9$regimeB.censor, do.exact = FALSE, do.asymp = TRUE)


[Package ANSM5 version 1.1.0 Index]