Learn R Programming

FDRsamplesize2 (version 0.2.0)

power.signtest: Compute power of the sign test

Description

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

Usage

power.signtest(n, alpha, p)

Value

Vector of power estimates for two-sided tests

Arguments

n

sample size (scalar)

alpha

p-value threshold (scalar)

p

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

Details

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

References

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

Examples

Run this code
p = rep(c(0.8,0.5),c(100,900));
res = power.signtest(n = 50, alpha = 0.05, p = p)

Run the code above in your browser using DataLab