View source: R/average_power.R
average.power.twoprop | R Documentation |
Computer average power of many two proportion z-tests.The power calculation of two proportion z-test is based on asymptotic normal approximation.
average.power.twoprop(n, alpha, p1, p2, alternative)
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 |
Average power estimate for multiple testing procedure
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.