title: Calculating the correct parameters for fisher's test power function in R
body: <p>I'm trying to calculate the power of Fisher's exact test in R for a 2x2 contingency table. But not sure I'm using the correct paramenters. Could anyone have a look at my logic below and tell me if this is the correct approach?</p>
  
  <p>The R function used (in <code>statmod</code>):</p>
  
  <pre><code>power.fisher.test(p1, p2, n1, n2, alpha=0.05, nsim=100, alternative="two.sided")
  </code></pre>
  
  <p><code>p1</code> - ﬁrst proportion to be compared.</p>
  
  <p><code>p2</code> - second proportion to be compared.</p>
  
  <p><code>n1</code> - ﬁrst sample size.</p>
  
  <p><code>n2</code> - second sample size</p>
  
  <p>My example contingency table:</p>
  
  <pre><code>     Yes|No
  
  Team1 a | b
  
  Team2 c | d
  </code></pre>
  
  <p>The way I calculate proportions and sample sizes for the contingency table above. Are these correct? Or do I need to make any amendments?</p>
  
  <pre><code>p1=a/(a+c)
  
  p2=b/(b+d)
  
  n1=a+c
  n2=b+d
  </code></pre>