Description Usage Arguments Value Examples
View source: R/odds_ratio_function.R
Calculates the odds ratio for a given power, at a given sample size, N, with type 1 error rate, Alpha
1 2 3 4 5 6 7 8 9 10 11 |
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 |
power |
Vector of powers to detect |
risk_allele |
Logical: If OR > 1, the allele is classified as a "risk allele" |
Alpha |
the desired type 1 error rate(s) |
True.Model |
A vector vector 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 odds ratios for all combinations of the specified parameters
1 2 3 | 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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.