tauStarTest | R Documentation |
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>.
tauStarTest(x, y, error = 0.01)
x |
a vector of sampled values. |
y |
a vector of sampled values corresponding to x, y must be the same length as x. |
a list with class "tstest" recording the outcome of the test.
Preetam Nandy, Luca Weihs, and Mathias Drton. Large-Sample Theory for the Bergsma-Dassios Sign Covariance. arXiv preprint arXiv:1602.04387. 2016.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.