Calculate Fisher Exact Test even if all cell counts >= 5
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 18 Sep 2013 17:16:08 +0000 (19:16 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 20 Sep 2013 15:34:43 +0000 (17:34 +0200)
Remove the condition that one of the cell counts must be < 5
before calculating the fisher exact test.  This condition seems
to be an anachronism, but still (erroneously) documented in Algorithms.

NEWS
src/language/stats/crosstabs.q

diff --git a/NEWS b/NEWS
index e37115b36dfea877d8cfacb9d15e78db5c2e4a49..92c0a4fb02420dbec0993bffc2f99461bf32e075 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,11 @@ Changes after 0.8.0:
 
    - VARIABLE ROLE.
 
+ * Changes to existing commands:
+
+   - CROSSTABS: The requirement that one expected count must be less than five
+       before Fishers Exact Test will be reported has been removed.
+
  * PSPPIRE graphical user interface improvements:
 
    - A new set of icons has been contributed.
index 6d4ab64ea0fd987a49109a2fa3dc18d389083e70..6adae77b030a674e81035da71ea6dd245652f828 100644 (file)
@@ -2244,8 +2244,7 @@ calc_chisq (struct pivot_table *pt,
       }
 
       /* Fisher. */
-      if (f11 < 5. || f12 < 5. || f21 < 5. || f22 < 5.)
-       calc_fisher (f11 + .5, f12 + .5, f21 + .5, f22 + .5, fisher1, fisher2);
+      calc_fisher (f11 + .5, f12 + .5, f21 + .5, f22 + .5, fisher1, fisher2);
     }
 
   /* Calculate Mantel-Haenszel. */