Is a Fisher's Exact test in a 7x9 contingency table feasible?

Hello all,
I have a question regarding the use of SPSS (i.e. its capability) to execute a Fisher's Exact test for large, sparse RxC contingency tables. I would like to test whether or not a certain correlation exist between my rows (diagnostic groups) and columns (laboratory tests) (see below).

Currently, I have a contingency table of 7 rows and 9 columns, that includes the data of 164 patients. Rows consist of certain diagnostic groups (e.g. different neurological diseases grouped together in a 'neurological disease' diagnostic group) while columns are the number of patients that have undertaken a certain laboratory test. However, multiple diagnostic groups have zero patients that underwent a certain test, and only 11.11% of the results are larger than 5 patients. As such, I can not use the Chi square test. Many suggest combining different rows and columns to evade this problem. However, in this case, I would like to avoid this since I am researching whether or not certain tests are associated with certain diagnostic groups, and by combining rows/columns, my research question would be in vain.

Therefore, I am looking for other possibilities to determine the presence of a correlation. One of my options would be to use a Fisher's exact test for R x C tables, since this test does not use the assumptions of the Chi squared test. I already know how to execute a Fisher's Exact test in SPSS for R x C tables. However, is it feasible to execute a Fisher's exact test for a table as large as 7x9, or should I use other statistical tests (and if yes, which tests do you recommend)?
Thanks in advance.
Last edited by a moderator:


Not a robit
Well I would imagine it is feasible, but it may take a long time to execute and you may need to tell SPSS not to time out. However, what is your plan once the test is ran. If significant, you have evidence to reject the null of comparable proportions. Would you then run all pairwise comparisons? If so, correct for false discovery? If so, why don't you just skip to that step if your big ol's contingency table wont process. It may also be beneficial for you to just post the table so we can see what you are writing about.
Hi hlsmith, sorry but your talking to a real novice here :D What do you mean by pairwise comparisons? A 2x2 table of disease 1-non disease 1 vs test 1-non test 1?
How can I correct for false discovery?
Regarding the table, the site tells me that my file does not have an allowed extension (with both a SPSS .sav file and an excel file)
Well, the purpose of our study is to determine whether or not there is a relation between certain lab tests and certain types of diseases (e.g. patients with neurological diseases more often having a lab test A positive). If this is the case, we want to check if there is a relation between the lab test and specific diagnoses within the group (e.g. neurological diseases ģroup of 20 patients = 5 different diagnoses combined). As such, we want to determine if a certain test hints at a certain diseases.

It could be that I am wrong, but I thought that the Fisher exact determined whether or not your 'columns' were significantly influenced by your 'rows' (sorry, don't know the right terms) such as in the typical example of healthy-non healthy versus smoker-nonsmoker?
Dear hlsmith, could you maybe shine your light on my method described below, and evaluate whether or not my methods and conclusions are correct?

After running my Fisher exact test for 10 hours without result, I've experimented a bit further in SPSS and I stumbled upon the option of Monte Carlo analysis. According to this book about Exact tests I found online (, Monte Carlo enables us to perform a Chi square (/ Fisher Exact) test when assumptions are not met. Consequently, I used this to analyse my data. First I did a 'global' analysis between my diagnostic groups and tests. Afterwards, I tested each diagnostic group versus each test ( = pairwise comparison I think?).
Online, however, I found another way to do this: by selecting in SPSS to calculate the z-score or the adjusted residuals, I can instantly detect which pairs are significantly different from others (e.g. when the adjusted residual is greater than +/- 1,96 or when the output of SPSS tells me so (when I select z-scores to calculate) as like in the attached file). However, I think that when you compare different groups multiple times, that you have to adjust for multiple comparison by e.g. a Bonferroni correction (the explanation behind this that when you have a 95% CI, you have 5% chance of testing wrong, but when you test multiple times you have 5%*5%*5%*... chance, correct?). In my opinion, this resulted in none of my associations to be significant (see file).
- I can use the Monte Carlo option to enable Chi square testing when conditions are not met?
- Instead of doing multiple pairwise 2x2 comparisons, I can combine this in one analysis with adjusted residuals/ z-scores selected?
- Since I have larger tables than 2x2, and thus more comparisons, I have to correct for multiple comparisons with the Bonferroni correction?
- None of my associations diagnostic groups - tests are significant?
- Question: should I use the Chi square or Fisher Exact result (see file) for interpretation

PS: I apologise for the 'amateur' file below, but my supervisor wishes (due to confidentiality issues) not to declassify to much information.



Not a robit
Yeah, your thoughts are correct for the most part. if you have expected cell counts <5 you use Fisher's test, which is your case. Your row names are cut off and I didn't quite understand the output of the Z-score table, but it sounded like chi-sq residuals.