Documentation ¶
Overview ¶
Package fet implements Fisher's Exact Test for 2x2 contigency tables.
It was ported from the C/C++ at https://github.com/gatoravi/fisher-exact
Index ¶
Constants ¶
View Source
const KF_GAMMA_EPS = 1e-14
View Source
const KF_TINY = 1e-290
Variables ¶
This section is empty.
Functions ¶
func ChiSquareStat ¶
ChiSquareStat computes the chi-squared test statistic, for a 2x2 contingency table; with optional yates correction. See ChiSquareTest for a p-value.
func ChiSquareTest ¶
ChiSquareTest computes the chi-squared test statistic, for a 2x2 contingency table; with optional yates correction, and then returns the p-value for that test.
func FisherExactTest ¶
func FisherExactTest(n11 int, n12 int, n21 int, n22 int) (probOfCurrentTable, leftp, rightp, twop float64)
FisherExactTest computes Fisher's Exact Test for
contigency tables. Nomenclature: n11 n12 | n1_ n21 n22 | n2_ -----------+---- n_1 n_2 | n
Returned values:
probOfCurrentTable = probability of the current table leftp = the left sided alternative's p-value (h0: odds-ratio is less than 1) rightp = the right sided alternative's p-value (h0: odds-ratio is greater than 1) twop = the two-sided p-value for the h0: odds-ratio is different from 1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.