tauStarTest: Test of Independence Using the Tau* Measure

View source: R/tauStarDE.R

tauStarTestR Documentation

Test of Independence Using the Tau* Measure

Description

Performs a (consistent) test of independence between two input vectors using the asymptotic (or permutation based) distribution of the test statistic t*. The asymptotic results hold in the case that x is generated from either a discrete or continous distribution and similarly for y (in particular it is allowed for one to be continuous while the other is discrete). The asymptotic distributions were computed in Nandy, Weihs, and Drton (2016) <http://arxiv.org/abs/1602.04387>.

Usage

tauStarTest(x, y, error = 0.01)

Arguments

x

a vector of sampled values.

y

a vector of sampled values corresponding to x, y must be the same length as x.

Value

a list with class "tstest" recording the outcome of the test.

References

Preetam Nandy, Luca Weihs, and Mathias Drton. Large-Sample Theory for the Bergsma-Dassios Sign Covariance. arXiv preprint arXiv:1602.04387. 2016.

Examples

set.seed(123)
x = rnorm(100)
y = rnorm(100)
testResults = tauStarTest(x,y)
print(testResults$pVal) # big p-value

y = y + x # make x and y correlated
testResults = tauStarTest(x,y)
print(testResults$pVal) # small p-value

SONGDONGYUAN1994/PseudotimeDE documentation built on Jan. 23, 2025, 7:15 a.m.