tocher.cor: Tocher's randomized correction to the exact p-value

tocher.corR 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 (\insertCitetocher: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 α, a random number, U, is generated from uniform distribution in (0,1), and if U ≤q (α-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;θ) where θ is the odds ratio under the null hypothesis (e.g. θ=1 under independence) and f is the probability mass function of the hypergeometric distribution. In testing the one-sided alternative H_o:\,θ=1 versus H_a:\,θ>1, let p=∑_S f(t|n_1,n_2,c_1;θ=1), then with S=\{t:\,t ≥q 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 (\insertCiteceyhan:exact-NNCT;textualnnspat) 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 p-value for Fisher's exact test on the contingency table.

Value

A modified p-value based on the Tocher's randomized correction.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

prob.nnct, exact.pval1s, and exact.pval2s

Examples

ptab<-.03
pval<-.06
tocher.cor(ptab,pval)


elvanceyhan/nnspat documentation built on Sept. 4, 2022, 10:28 a.m.