Learn R Programming

staRank (version 1.14.0)

mwTest2samp: mwTest2samp

Description

Modified version of wilcox.test (taken from src/library/stats/R/wilcox.test.R) which performes a two-sample Mann-Withney test only and therefore is faster than the original version.

Usage

mwTest2samp(x, y, alternative = c("two.sided", "less", "greater"), correct = TRUE)

Arguments

x
a numeric vector.
y
a numeric vector.
alternative
one of c("two.sided", "less", "greater").
correct
boolean.

Value

the test statistic and the p-value of the test.

Examples

Run this code
x<-rnorm(100)
y<-rnorm(100,mean=1)
mwTest2samp(x,y,alternative='two.sided')

Run the code above in your browser using DataLab