Description Usage Arguments Details Value Examples
View source: R/fdr-sampsize-v1.0e.R
Compute power of one-way ANOVA;Uses classical power formula for ANOVA;Assumes equal variance and sample size
1 | power.oneway (n, alpha, theta, k = 2)
|
n |
per-group sample size (scalar) |
alpha |
p-value threshold (scalar) |
theta |
sum of ((group mean - overall mean)/stdev)^2 across all groups for each hypothesis test (vector) |
k |
the number of groups to be compared, default k=2 |
For many applications, the null effect is zero for the parameter theta described above.
vector of power estimates for test of equal means
1 2 3 4 5 6 7 8 | power.oneway # show the power function
res=fdr.sampsize(fdr=0.1,
ave.pow=0.8,
pow.func=power.oneway,
eff.size=rep(c(2,0),c(100,900)),
null.effect=0,
k=3)
res
|
function (n, alpha, theta, k = 2)
{
1 - pf(qf(1 - alpha, k - 1, k * (n - 1)), k - 1, k * (n -
1), ncp = n * theta)
}
<environment: namespace:FDRsampsize>
n alpha ave.pow fdr.hat act.fdr
9.000000000 0.007629395 0.800052317 0.079043049 0.079041346
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.