taba: Robust Correlation

Description Usage Arguments Details Value References See Also Examples

View source: R/Taba.R

Description

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

Usage

1
taba(x, y, method = c("taba", "tabarank","tabwil", "tabwilrank"), 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.

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 can be used to compare 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. Missing values in either x or y are deleted row-wise. The default method is Taba Linear correlation, with the tuning constant omega.

Value

This function returns a the robust linear or monotonic association between two numeric vectors as a numeric.

References

Tabatabai, M., Bailey, S., Bursac, Z. et al. An introduction to new robust linear and monotonic correlation coefficients. BMC Bioinformatics 22, 170 (2021). https://doi.org/10.1186/s12859-021-04098-4

doi: 10.1186/s12859-021-04098-4

See Also

taba.test for testing 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(100)
y = rnorm(100)
taba(x, y)
taba(x, y, method = "tabarank", omega = 0.4)
taba(x, y, method = "tabwil", omega = 0.22)

Example output

[1] -0.02599408
[1] -0.003821337
[1] 0.1693219

Taba documentation built on April 1, 2021, 1:06 a.m.

Related to taba in Taba...