ranksum: Wilcoxon-Mann-Whitney U-Statistic

Description Usage Arguments Details Value Author(s)

Description

Wilcoxon-Mann-Whitney U-Statistic

Usage

1
ranksum(x, g)

Arguments

x

either a numeric vector or column matrix of outcomes (see Details)

g

group assignments (see Details)

Details

Computes the Wilcoxon-Mann-Whitney U-Statistic. Note that we do not remove the expected value n_T(n_T+1)/2 from the statistic as this is assumed to be equal across all permutations!

Group assignments can be passed via g using either a numeric/integer factor, vector, or matrix. All elements with values below or equal to zero are treated as belonging to the control, all above as belonging to the treatment group.

If either x or g are passed as matrices test statistics each computed for each column of outcomes or treatment assignments. Passing both as matrices does not work!

Value

numeric vector of test statistics

Author(s)

Florian Klinglmueller


floatofmath/adaperm documentation built on May 16, 2019, 1:18 p.m.