3

I have 4x2 contingency tables and would like to perform Fisher's exact test on them. R stats package(https://www.rdocumentation.org/packages/stats/versions/3.6.1/topics/fisher.test) supports 4x2 test by combing p-values with Monte Carlo simulation. The result is not significant. I would like to perform power analysis to check whether the sample size is too small to detect differences between two categorical variables. However, R stats package (https://www.rdocumentation.org/packages/statmod/versions/1.4.32/topics/power.fisher.test) does not support the analysis on 4X2 tables. Do you know how to perform power analysis in this case? Is there any implementation supporting it?

Many thanks!

  • 1
    If you have a specific alternative in mind (e.g. a set of population proportions for each cell -- there's 3 "free" cells and the rest will then be fixed), you can compute power fairly easily by simulation. Note that the marginal totals are a given. – Glen_b Nov 25 '19 at 23:51
  • 1
    There's a related post here that may be of some use: https://stats.stackexchange.com/questions/133441/computing-the-power-of-fishers-exact-test-in-r (beware calculating "post hoc" power, as noted there) – Glen_b Nov 26 '19 at 00:01
  • 1
    Possible dups: https://stats.stackexchange.com/questions/133441/computing-the-power-of-fishers-exact-test-in-r, https://stats.stackexchange.com/questions/420474/interpreting-fishers-test-and-power-analysis-in-r – kjetil b halvorsen Nov 26 '19 at 05:35
  • @Glen_b-ReinstateMonica Thanks for your answer. Can you elaborate on the 3 free cells? – Nan Yang Nov 28 '19 at 15:21
  • Imagine the table is oriented so it was 4 rows and 2 columns, with all marginal cells known. If I choose a row and specify one cell value, I know the other value in the same row (since they add to the known row-total). The same is true for each other row --- in spite of the fact that there are two numbers per row, we have only as one d.f. in that direction, the other was lost by specifying the total. Now consider the first column. If we specify 3 values, we know the fourth because we know the column total. We have lost 1 .d.f. in this direction as well. We have in total $(r-1)\times(c-1)$ d.f. – Glen_b Nov 28 '19 at 23:16
  • ... which is to say we are free to specify that many values in the table (within the constraints implied by the totals - as long as we don't specify more than $c-1$ in any row nor more than $r-1$ in any column), before the remaining $r+c-1$ values are already determined. So in the 4x2 case, if you keep the 3 values in different rows, you can specify all 3 of them before you can specify no more (since the remainder are already determined) – Glen_b Nov 28 '19 at 23:18
  • thanks for your elaboration! – Nan Yang Dec 09 '19 at 12:37

0 Answers0