powered by
Calculates the odds ratio for a given power, at a given sample size, N, with type 1 error rate, Alpha
odds_ratio_function(N = NULL, Case.Rate = NULL, k = NULL, MAF = NULL, power = NULL, risk_allele = TRUE, 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 powers to detect
Logical: If OR > 1, the allele is classified as a "risk allele"
the desired type 1 error rate(s)
A vector vector 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 odds ratios for all combinations of the specified parameters
# NOT RUN { or <- odds_ratio_function(N=c(100), Case.Rate=0.3, k=NULL, MAF= 0.25, power=0.8, Alpha = 0.05, risk_allele = TRUE, True.Model = 'All', Test.Model = 'All') # }
Run the code above in your browser using DataLab