taba.matrix: Robust Correlation Matrix

Description Usage Arguments Details Value References See Also Examples

View source: R/TabaMatrix.R

Description

Calculates a correlation, distance, and p-value matrix using one of the specified robust methods Taba linear or Taba rank correlation.

Usage

1
2
3
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 "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 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

The paper is under review for possible publication.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

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

Related to taba.matrix in Taba...