corken: Kendall's Tau (empirical)

Description Usage Arguments Value References Examples

Description

Wrapper function for computing all pairwise Kendall rank correlation coefficients between the columns of a given data matrix.

Usage

1
corken(data, use = "everything", fast = FALSE)

Arguments

data

Matrix or dataframe of appropriate dimension (n x d). Supplies the data as a matrix or data frame.

use

character. String (may be abbreviated) indicating the treatment of missing values: "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs" (see cor for an explanation of the options).

fast

logical. For large data sets without missing values, the computation of Kendall's tau can be sped up considerably by using the function cor.fk from the package pcaPP.

Value

Matrix with pairwise Kendall rank correlation coefficients between the columns of the supplied data.

References

Davies (2016). The Book of R: A first course in programming and statistics. no starch press.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# standard usage
iris <- iris[, -5]
corken(iris)

# with missing values (fast not working)
iris[1,1] <- NA
corken(iris)
corken(iris, use = "complete.obs")
corken(iris, fast = TRUE)

# fast (only works without missing values)
corken(swiss, fast = TRUE)

AlexanderRitz/copR documentation built on Oct. 30, 2019, 4:11 a.m.