Description Usage Arguments Details Value Examples
View source: R/fdr-sampsize-v1.0e.R
Estimate power of the two-samples t-test;Uses classical power formula for two-sample t-test;Assumes equal variance and sample size
1 | power.twosampt (n, alpha, delta, sigma = 1)
|
n |
per-group sample size (scalar) |
alpha |
p-value threshold (scalar) |
delta |
difference between population means (vector) |
sigma |
standard deviation (vector or scalar) |
For many applications, the null.effect is zero difference of means.
vector of power estimates for two-sided test
1 2 3 4 5 6 7 8 | power.twosampt # show the power function
res=fdr.sampsize(fdr=0.1,
ave.pow=0.8,
pow.func=power.twosampt,
eff.size=rep(c(2,0),c(100,900)),
null.effect=0,
sigma=1)
res
|
function (n, alpha, delta, sigma = 1)
{
1 - pf(qf(1 - alpha, 1, 2 * (n - 1)), 1, 2 * (n - 1), ncp = n *
(delta/sigma)^2/2)
}
<environment: namespace:FDRsampsize>
n alpha ave.pow fdr.hat act.fdr
8.000000000 0.008087158 0.800038317 0.083392914 0.083389697
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.