power.signtest: Compute power of the sign test

Description Usage Arguments Details Value References Examples

View source: R/fdr-sampsize-v1.0e.R

Description

Use the Noether (1987) formula to compute the power of the sign test

Usage

1
power.signtest (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 instead of p = 0. Thus, in the call to fdr.sampsize, we specify null.effect=0.5 in the example below.

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

1
2
3
4
5
6
7
 power.signtest        # show the power function
 res=fdr.sampsize(fdr=0.1,
                  ave.pow=0.8,
                  pow.func=power.signtest,
                  eff.size=rep(c(0.8,0.5),c(100,900)),
                  null.effect=0.5)
 res

FDRsampsize documentation built on May 2, 2019, 9:14 a.m.