prob.nnct: Probability of the current nearest neighbor contingency table

prob.nnctR Documentation

Probability of the current nearest neighbor contingency table

Description

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;\theta) where \theta=(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 \theta 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.

Usage

prob.nnct(ct)

Arguments

ct

A NNCT

Value

The probability of getting the observed NNCT, ct , under the null hypothesis.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

exact.pval1s and exact.pval2s

Examples

ct<-matrix(sample(20:40,4),ncol=2)
prob.nnct(ct)

ct<-matrix(sample(20:40,4),ncol=2)
prob.nnct(ct)


nnspat documentation built on May 29, 2024, 10:03 a.m.