average.power.twoprop {FDRsamplesize2}R Documentation

Computer average power of many two proportion z-tests

Description

Computer average power of many two proportion z-tests.The power calculation of two proportion z-test is based on asymptotic normal approximation.

Usage

average.power.twoprop(n, alpha, p1, p2, alternative)

Arguments

n

per-group sample size (scalar)

alpha

p-value threshold (scalar)

p1

probability in one group (vector)

p2

probability in other group (vector)

alternative

one- or two-sided test

Value

Average power estimate for multiple testing procedure

Examples

set.seed(1234);
p1 = sample(seq(0,0.5,0.1),40,replace = TRUE);
p2 = sample(seq(0.5,1,0.1),40,replace = TRUE);
average.power.twoprop(n = 30, alpha = 0.05, p1 = p1,p2 = p2,alternative="two.sided")

[Package FDRsamplesize2 version 0.2.0 Index]