Solved – Exact test for m x n contingency table conditional (i.e. fixed by design) on one margin

contingency tablescount-dataexact-testhypothesis testingstatistical significance

I have a $m \times n$ contingency table (with $m, n > 2)$ . The experiment yields ~15% cells with expected frequencies lower 5 and also zero counts in the empirical data. The prerequisite for the asymptotic $\chi^2$-Test do not hold. Thus, I want to use an exact test (or its simulation variants). Also, one margin is conditional (fixed by design) and the other margin is undconditional (e.g. fixed counts in row margin and random counts in column margin).

Which test is the right one to choose here? Fisher's exact test is conditional on both margins, so the requirements are violated. Barnard's test is unconditional on both margins but AFAIK only applicable to $2 \times 2$ tables. I could not find any hints to a $m \times n$ generalization of Barnard's test.

Which test is applicable to my situation?

Best Answer

@Mark, not sure which tool you are considering to do the test with but refer to this link https://mrnoutahi.com/2016/01/03/Fisher-exac-test-for-mxn-table/ where Fischer exact test was done for the unconditional likelihood estimate and the code is written in python.

Hope this is helpful.

Related Question