powered by
Calculates the power to detect an odds ratio, OR, at a given sample size, N, with type 1 error rate, Alpha
power.calc(N = NULL, Case.Rate = NULL, k = NULL, MAF = NULL, OR = NULL, Alpha = 0.05, True.Model = "All", Test.Model = "All")
Vector of the desired sample size(s)
Vector of the proportion(s) of cases in the sample (cases/(cases + controls)). Either k or Case.Rate must be specified.
Vector of the number of controls per case. Either k or Case.Rate must be specified.
Vector of minor allele frequencies
Vector of odds ratios to detect
the desired type 1 error rate(s)
A vector specifying the true underlying genetic model(s): 'Dominant', 'Additive', 'Recessive' or 'All'
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)
# NOT RUN { 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') # }
Run the code above in your browser using DataLab