taba.test: Robust Correlation Test

Description Usage Arguments Details Value References See Also Examples

View source: R/TabaTest.R

Description

Tests the association between two numeric vectors using Taba robust linear, Taba rank (monotonic), TabWil, or TabWil rank correlation coefficient.

Usage

1
2
taba.test(x, y, method = c("taba", "tabarank","tabwil", "tabwilrank"),
         alternative = c("less", "greater", "two.sided"), omega)

Arguments

x

A numeric vector of length greater than 2 must be same length as y

y

A numeric vector of length greater than 2 must be same length as x

method

A character string of "taba", "tabarank", "tabwil", or "tabwilrank" determining if one wants to calculate Taba linear, Taba rank (monotonic), TabWil, or TabWil rank correlation, respectively. If no method is specified, the function will output Taba Linear correlation.

alternative

Character string specifying the alternative hypothesis must be one of "less" for negative association, "greater" for positive association, or "two.sided" for difference in association. If the alternative is not specified, the function will default to a two sided test.

omega

Numeric allowing the user to alter the tuning constant. If one is not specified, the function will default to 0.45 for Taba and Taba rank, and 0.1 for TabWil and TabWil rank. Range is between 0 and 1.

Details

This function tests the association of two non-empty numeric vectors of length greater than two, or two columns of a data frame or matrix composed of more than two numeric elements. Covariates are combined colomn-wise and can be numeric vectors, matricies, or data frames with numeric cells. Each column in the matrix or data frame will be treated as a different covariate, and must have different names. Missing values in either x or y are deleted row-wise. The two sided test with the null hypothesis correlation is equal to zero. The default is a two sided test using Taba Linear correlation, with tuning constant omega.

Value

This function returns the robust linear or monotonic association between two numeric vectors, along with it's respective test statistic, and p-value.

References

The paper is under review for possible publication.

See Also

taba for calculating Taba linear or Taba rank (monotonic) correlations
taba.partial for partial and semipartial correlations
taba.gpartial for generalized partial correlations
taba.matrix for calculating correlation, p-value, and distance matricies

Examples

1
2
3
4
5
x = rnorm(10)
y = rnorm(10)
taba.test(x, y)
taba.test(x, y, method = "tabarank", alternative = "less")$p.value
taba.test(x, y, method = "tabwil", omega = .1)

Taba documentation built on July 22, 2020, 5:08 p.m.

Related to taba.test in Taba...