rankSum {ClassComparison}R Documentation

Wilcoxon Rank-Sum Statistic

Description

Compute the Wilcoxon rank-sum statistic

Usage

rankSum(data, selector)

Arguments

data A numeric vector
selector A logical vector the same length as data.

Details

This is an efficient function to compute the value of the Wilcoxon rank-sum statistic without the extra overhead of the full wilcox.test function. It is used internally by the MultiWilcoxonTest class to perform rwo-by-row Wilcoxon tests.

Value

Returns an integer, the rank-sum of the subset of the data for which the selector is true.

Author(s)

Kevin R. Coombes <kcoombes@mdanderson.org>

See Also

dwil, MultiWilcoxonTest

Examples

dd <- rnorm(100)
cc <- rep(c(TRUE, FALSE), each=50)
rankSum(dd, cc)
rm(cc, dd)

[Package ClassComparison version 2.5.0 Index]