Tocher's modification is used for the Fisher's exact test on the contingency tables making it less conservative, by including the probability for the current table based on a randomized test (tocher:1950;textualnnspat). It is applied When table-inclusive version of the \(p\)-value, \(p^>_{inc}\), is larger, but table-exclusive version, \(p^>_{exc}\), is less than the level of the test \(\alpha\), a random number, \(U\), is generated from uniform distribution in \((0,1)\), and if \(U \leq (\alpha-p^>_{exc})/p_t\), \(p^>_{exc}\) is used, otherwise \(p_{inc}\) is used as the \(p\)-value.
Table-inclusive and exclusive \(p\)-values are defined as follows. Let the probability of the contingency table itself be \(p_t=f(n_{11}|n_1,n_2,c_1;\theta)\) where \(\theta\) is the odds ratio under the null hypothesis (e.g. \(\theta=1\) under independence) and \(f\) is the probability mass function of the hypergeometric distribution. In testing the one-sided alternative \(H_o:\,\theta=1\) versus \(H_a:\,\theta>1\), let \(p=\sum_S f(t|n_1,n_2,c_1;\theta=1)\), then with \(S=\{t:\,t \geq n_{11}\}\), we get the table-inclusive version which is denoted as \(p^>_{inc}\) and with \(S=\{t:\,t> n_{11}\}\), we get the table-exclusive version, denoted as \(p^>_{exc}\).
See (ceyhan:exact-NNCT;textualnnspat) for more details.
tocher.cor(ptable, pval)
A modified \(p\)-value based on the Tocher's randomized correction.
Probability of the contingency table under the null hypothesis using the hypergeometric distribution for Fisher's exact test.
Table inclusive \(p\)-value for Fisher's exact test on the contingency table.
Elvan Ceyhan
prob.nnct
, exact.pval1s
, and exact.pval2s
ptab<-.03
pval<-.06
tocher.cor(ptab,pval)
Run the code above in your browser using DataLab