# Odds ratio necessary to achieve a certain power

I have the data resulting from a genome wide association study. What this means is that logistic regression has been used to determine the association of each genetic variant with the phenotype (which is case/control), with the desired statistic being an odds ratio. I believe the power will be calculated with based on four components:

• The effect size (in this case odds ratio),

• The threshold of statistical significance,

• The number of samples,

• And the minor allele frequency in the sample (in other words, the prevalence of the less-common value of the independent variable).

So if I take that list and swap out the effect size for the desired power, I should be able to calculate the odds ratio I need.

I imagine the process working like this:

• I use the significance level to find the corresponding z-score,

• I calculate the standard error of the odds ratio from the sample size and minor allele frequency,

• I use the z-score and the standard error to determine the minimum odds ratio that will pass the test,

• and I then determine how large the odds ratio needs to be, given its standard error, for there to be an 80% chance (or any other power level) that it will be higher than the minimum passing z-score.

First of all, is this correct? If it is, then my question is: how do I determine the standard error of the odds ratio?

In case an example is helpful, I have one genetic variant that has 61,000 samples, 28% of which are A and 72% of which are B. Given that my significance threshold is $5 \times 10^{-8}$, how large an odds ratio would this variant have to have for the power to be 0.8?

Edit: Additionally, should I be doing this with the log OR instead?

• How many variants are you examining for relation to the phenotype? What is the distribution of cases between the phenotype classes? – EdM Aug 26 '16 at 13:59
• @EdM I'm examining 175,167 subjects; 5*10e-8 is the genome-wide significance level. For this particular variant, there are 15,531 cases and 16,876 controls with the minor allele, and 41,019 cases and 44,222 controls with the major allele. – njc Aug 26 '16 at 14:18
• @EdM Does only the minor allele frequency of the controls matter? I'm trying to replicate a figure that plots the required OR (for 0.8 power) based on MAF, which seems to imply that this is the case. However, I found these lecture slides, which on page 11 seem to say that you need that information for both cases and controls. – njc Aug 26 '16 at 14:21

If you already have all the data (as you seem to), there isn't much point to calculating the power. Either you will find significant differences or you won't. Russ Lenth's web page explains why retrospective power calculations are inadvisable.

If you are still designing the study, or for future reference, then you are probably better off using a well vetted program for power calculations rather than designing your own. The gap package in R seems to fit your needs, with its pbsize2() function specifically written for case-control association study design. That function's manual page specifies the information required to calculate power:

Essentially, for given sample size(s), a proportion of which (fc) being cases, the function calculates power estimate for a given type I error (alpha), genotype relative risk (gamma),frequency of the risk allele (p), the prevalence of disease in the population (kp) and optionally a disease model (model).

For "disease" you would substitute your phenotype. In practice, you would use this function iteratively for study design to find the sample size needed to meet your requirements.

If you are doing multiple association tests, or looking genome wide for associations without prior hypotheses, then you have to take into account multiple testing. The very low significance threshold you specify suggests that you have already done so.

In terms of the standard error of an odds ratio, you should use the log OR, as explained on this Cross Validated page. If your data are in the form of a 2 x 2 contingency table (cases/controls x major/minor allele) then you need to have all four values in the table. I think the apparent discrepancy between the sources you cite in a comment is that the power calculation is done pre-study with the phenotype/allele association not yet known, while the odds-ratio calculations are based on already observed phenotypes and alleles.

• Thank you very much! I'm doing the post-study power calculations in order to create a figure similar to this one, as opposed to trying to determine afterwards whether the study was a good idea. The gap package looks helpful; I'll give it a go. – njc Aug 29 '16 at 13:30
• @njc The cited paper evidently used an online genetic power calculator for its power calculations; see the Methods, Association Analysis, Power Calculation and the legend to the figure that you linked. – EdM Aug 29 '16 at 13:56