power.ranksum {FDRsamplesize2}R Documentation

Compute power of the rank-sum test

Description

Compute power of rank-sum test; Uses formula of Noether (JASA 1987), which is based on asymptotic normal approximation.

Usage

power.ranksum(n, alpha, p)

Arguments

n

sample size (scalar)

alpha

p-value threshold (scalar)

p

Pr(Y>X), as in Noether (JASA 1987)

Details

In most applications, the null effect size will be designated by p = 0.5

Value

Vector of power estimates for two-sided tests

References

Noether, Gottfried E (1987) Sample size determination for some common nonparametric tests. Journal of the American Statistical Association, 82:645-647.

Examples

p = rep(c(0.8,0.5),c(100,900))
res = power.ranksum(n = 50, alpha = 0.5, p=p)

[Package FDRsamplesize2 version 0.2.0 Index]