Fisher's Exact Test for Count Data
DescriptionPerforms Fisher's exact test for testing the null of independence of rows and columns in a contingency table with fixed marginals. Usagefisher.test(x, y = NULL, workspace = 200000, hybrid = FALSE, or = 1, alternative = "two.sided", conf.level = 0.95) Arguments
DetailsIf In the one-sided 2 by 2 cases, p-values are obtained directly using the hypergeometric distribution. Otherwise, computations are based on a C version of the FORTRAN subroutine FEXACT which implements the network developed by Mehta and Patel (1986) and improved by Clarkson, Fan & Joe (1993). The FORTRAN code can be obtained from http://www.netlib.org/toms/643. In the 2 by 2 case, the null of conditional independence is equivalent to the hypothesis that the odds ratio equals one. Exact inference can be based on observing that in general, given all marginal totals fixed, the first element of the contingency table has a non-central hypergeometric distribution with non-centrality parameter given by the odds ratio (Fisher, 1935). ValueA list with class
ReferencesAlan Agresti (1990). Categorical data analysis. New York: Wiley. Pages 59–66. Fisher, R. A. (1935). The logic of inductive inference. Journal of the Royal Statistical Society Series A 98, 39–54. Fisher, R. A. (1962). Confidence limits for a cross-product ratio. Australian Journal of Statistics 4, 41. Cyrus R. Mehta & Nitin R. Patel (1986). Algorithm 643. FEXACT: A Fortran subroutine for Fisher's exact test on unordered r*c contingency tables. ACM Transactions on Mathematical Software, 12, 154–161. Douglas B. Clarkson, Yuan-an Fan & Harry Joe (1993). A Remark on Algorithm 643: FEXACT: An Algorithm for Performing Fisher's Exact Test in r x c Contingency Tables. ACM Transactions on Mathematical Software, 19, 484–488. Benjamini and Hochberg Procedure. This is based on the paper by Benjamini Y. and Hochberg Y. (1995). Controlling the False Discovery Rate : a Practical and Powerful Approach to Multiple Testing. J.R.Statist.Soc. B 57, No. 1, pp. 289-300.
Last modified on the 29th November 2002.
Website comments to |