prob.nnct | R Documentation |
Computes the probability of the observed 2 \times 2 nearest neighbor contingency table (NNCT) p_t=f(n_{11}|n_1,n_2,c_1;θ) where θ=(n_1-1)(n_2-1)/(n_1 n_2) which is the odds ratio under RL or CSR independence and f is the probability mass function of the hypergeometric distribution. That is, given the margins of the current NNCT, the probability of obtaining the current table with the odds ratio θ being the value under the null hypothesis. This value is used to compute the table-inclusive and exclusive p-values for the exact inference on NNCTs.
See (\insertCiteceyhan:exact-NNCT;textualnnspat) for more details.
prob.nnct(ct)
ct |
A NNCT |
The probability of getting the observed NNCT, ct
, under the null hypothesis.
Elvan Ceyhan
exact.pval1s
and exact.pval2s
ct<-matrix(sample(20:40,4),ncol=2) prob.nnct(ct) ct<-matrix(sample(20:40,4),ncol=2) prob.nnct(ct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.