power.signrank {FDRsamplesize2}R Documentation

Compute power of the signed-rank test

Description

Use the Noether (1987) formula to compute the power of the signed-rank test, which is based on asymptotic normal approximation.

Usage

power.signrank(n, alpha, p1, p2)

Arguments

n

sample size (scalar)

alpha

p-value threshold (scalar)

p1

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

p2

Pr(X+X'>0), as in Noether (JASA 1987)

Details

In most applications, the null effect size will be designated by p1 = p2 = 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

p1 = rep(c(0.8,0.5),c(100,900));
p2 = rep(c(0.8,0.5),c(100,900));
res = power.signrank(n = 50, alpha = 0.05, p1 = p1, p2 = p2)

[Package FDRsamplesize2 version 0.2.0 Index]