EFT: Exact Functional Test on Two Discrete Random Variables

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Perform the exact functional test on a contingency table to determine if the column variable is a function of the row variable. The null population includes tables with fixed row and column sums as in the observed table. The null distribution follows an exact multivariate hypergeometric distribution.

Usage

1
2
EFTDP(nm)
EFTDQP(nm)

Arguments

nm

a matrix of nonnegative integers representing a contingency table.

Details

The exact functional test is performed using branch-and-bound with two algorithms (DP and DQP) to avoid re-calculation of bounds \insertCitenguyen2018modelfree,Nguyen2020EFTFunChisq.

Value

The exact p-value of the test.

Note

The functions provide a direct entry into the C++ implementations of the exact functional test \insertCitenguyen2018modelfree,Nguyen2020EFTFunChisq.

Author(s)

Hien Nguyen, Hua Zhong, and Joe Song

References

\insertAllCited

See Also

fun.chisq.test

Examples

1
2
3
4
5
6
x = matrix(c(0, 6, 3, 0, 10, 5, 4, 4, 1), nrow=3)
EFTDQP(x)
EFTDQP(t(x))

EFTDP(x)
EFTDP(t(x))

FunChisq documentation built on May 20, 2021, 1:09 a.m.