taba.matrix {Taba} | R Documentation |
Robust Correlation Matrix
Description
Calculates a correlation, distance, and p-value matrix using one of the specified robust methods Taba linear or Taba rank correlation.
Usage
taba.matrix(x, y = NULL, ..., 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 all other vectors. |
y |
A numeric vector of length greater than 2 must be same length as all other vectors. |
... |
Numeric vector(s) of length equal to x and y. May be of class matrix or data.frame, whose columns will be compared and whose column's length must be of equal length to x and y. Not one vector or column name can be "x" or "y." |
method |
A character string of |
alternative |
Character string specifying the alternative hypothesis must be one
of |
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 uses Taba linear, Taba rank (monotonic), TabWil, or TabWil rank correlation to
calculate the association of two or more numeric vectors. Numeric vectors under ...
are combined colomn-wise with x and y. When inserting a single matrix x, the function will
calculate the correlation matix using the columns of matrix x.
Matricies or data frames with numeric cells can be inserted in ...
, whereby
each column in the matrix or data frame will be treated as a different vector
for comparison. Columns must all have different names from each other. No vector
or column should be named "x" or "y," as these refer to the first two vectors respectively,
if inserted as a vector or matrix with no name. Missing values in any of the vectors
are deleted row-wise.
The default for this function is a two sided test using Taba linear partial correlation,
with the tuning constant omega
equal to 0.45.
Value
This function returns the robust association between two or more numeric vectors, as a matrix; the distance matrix, as type dist; and a p-value matrix corresponding to the correlation matrix.
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
for calculating Taba linear or Taba rank (monotonic) correlations
taba.test
for testing Taba linear or Taba rank (monotonic) correlations
taba.gpartial
for generalized partial correlations
taba.partial
for partial and semipartial correlations
Examples
x = rnorm(100)
y = rnorm(100)
z1 = rnorm(100)
z2 = rnorm(100)
z3 = rnorm(100)
Z = cbind(z1,z3)
colnames(Z) = c("A","B")
taba.matrix(x, y, z1, z2, z3, method = "tabarank")
taba.matrix(x, y, z2, Z, alternative = "less", omega = 0.4)
taba.matrix(Z, method = "tabarank")