| tocher.cor {nnspat} | R Documentation |
Tocher's randomized correction to the exact p-value
Description
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)). 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 (2010)) for more details.
Usage
tocher.cor(ptable, pval)
Arguments
ptable |
Probability of the contingency table under the null hypothesis using the hypergeometric distribution for Fisher's exact test. |
pval |
Table inclusive |
Value
A modified p-value based on the Tocher's randomized correction.
Author(s)
Elvan Ceyhan
References
Ceyhan E (2010).
“Exact Inference for Testing Spatial Patterns by Nearest Neighbor Contingency Tables.”
Journal of Probability and Statistical Science, 8(1), 45-68.
Tocher KD (1950).
“Extension of the Neyman-Pearson theory of tests to discontinuous variates.”
Biometrika, 37, 130-144.
See Also
prob.nnct, exact.pval1s, and exact.pval2s
Examples
ptab<-.03
pval<-.06
tocher.cor(ptab,pval)