wilcoxon: Compute the standardized Wilcoxon test statistic for two...

Description Usage Arguments Details Value

View source: R/utilities.R

Description

We compute the standardized Wilcoxon test statistic with mean 0 and and standard deviation 1 for samples x and y. The R function stats::wilcox.test() returns the statistic

Usage

1
wilcoxon(x, y, theta = 0)

Arguments

x

a sample numeric vector

y

a sample numeric vector

theta

a value > 0 but < 1/2.

Details

U = (sum over i) R_i - m(m + 1) / 2

where R_i are the ranks of the first sample x of size m. We compute

(U - mn(1/2 + theta)) / (mn(m + n + 1) / 12)^(1/2)

where θ is the alternative hypothesis shift on the probability scale, i.e. P(X > Y) = 1/2 + θ.

Value

the standardized Wilcoxon statistic


bnaras/ASSISTant documentation built on Nov. 23, 2019, 6:20 p.m.