Description Usage Arguments Value Examples
View source: R/power_function.R
Calculates the power to detect an odds ratio, OR, at a given sample size, N, with type 1 error rate, Alpha
1 2 3 4 5 6 7 8 9 10 |
N |
Vector of the desired sample size(s) |
Case.Rate |
Vector of the proportion(s) of cases in the sample (cases/(cases + controls)). Either k or Case.Rate must be specified. |
k |
Vector of the number of controls per case. Either k or Case.Rate must be specified. |
MAF |
Vector of minor allele frequencies |
OR |
Vector of odds ratios to detect |
Alpha |
the desired type 1 error rate(s) |
True.Model |
A vector specifying the true underlying genetic model(s): 'Dominant', 'Additive', 'Recessive' or 'All' |
Test.Model |
A vector specifying the assumed genetic model(s) used in testing: 'Dominant', 'Additive', 'Recessive' or 'All' |
A data frame including the power for all combinations of the specified parameters (Case.Rate, OR, Power, etc)
1 2 3 | pw <- power.calc(N=2000, Case.Rate=0.5, k=NULL,
MAF=0.2, OR=1.5,Alpha=0.05,
True.Model='All', Test.Model='All')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.