Exact Functional Test {FunChisq}R Documentation

Exact Functional Test on Two Discrete Random Variables

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

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 (Nguyen 2018; Nguyen et al. 2020).

Value

The exact p-value of the test.

Note

The functions provide a direct entry into the C++ implementations of the exact functional test (Nguyen 2018; Nguyen et al. 2020).

Author(s)

Hien Nguyen, Hua Zhong, Yiyi Li, and Joe Song

References

Nguyen HH (2018). Inference of Functional Dependency via Asymmetric, Optimal, and Model-free Statistics. Ph.D. thesis, Department of Computer Science, New Mexico State University, Las Cruces, NM, USA.

Nguyen HH, Zhong H, Song M (2020). “Optimality, accuracy, and efficiency of an exact functional test.” In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, 2683–2689. doi:10.24963/ijcai.2020/372.

See Also

fun.chisq.test

Examples

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

EFTDP(x)
EFTDP(t(x))

[Package FunChisq version 2.5.4 Index]