{'fraction_non_alphanumeric': 0.02938475665748393, 'fraction_numerical': 0.021120293847566574, 'mean_word_length': 4.828877005347594, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Confidence intervals that match Fisher's exact or Blaker's exact tests.

When analyzing a 2 x 2 table, the two-sided Fisher's exact test and the usual exact confidence interval (CI) for the odds ratio may give conflicting inferences; for example, the test rejects but the associated CI contains an odds ratio of 1. The problem is that the usual exact CI is the inversion of the test that rejects if either of the one-sided Fisher's exact tests rejects at half the nominal significance level. Further, the confidence set that is the inversion of the usual two-sided Fisher's exact test may not be an interval, so following Blaker (2000, Confidence curves and improved exact confidence intervals for discrete distributions. Canadian Journal of Statistics 28, 783-798), we define the "matching" interval as the smallest interval that contains the confidence set. We explore these 2 versions of Fisher's exact test as well as an exact test suggested by Blaker (2000) and provide the R package exact2x2 which automatically assigns the appropriate matching interval to each of the 3 exact tests.