Skip to contents

Uses the underlying c++ implementation of ici_kt to provide a fast version of Kendall-tau correlation.

Usage

kt_fast(x, y = NULL, use = "everything", return_matrix = TRUE)

Arguments

x

a numeric vector, matrix, or data frame.

y

NULL (default) or a vector.

use

an optional character string giving a method for computing correlations in the presence of missing values. This must be (an abbreviation of) one of the strings "everything", "all.obs", "complete.obs", or "pairwise.complete.obs".

return_matrix

Should the matrices of values be returned, or a long data.frame

Value

a named vector or list of matrices.

Details

Although the interface is mostly identical to the built-in stats::cor() method, there are some differences.

  • if providing both x and y, it is assumed they are both single vectors.

  • if NA values are present, this function does not error, but will either remove them or return NA, depending on the option.

  • "na.or.complete" is not a valid option for use.

  • A named vector or a named list with matrices is returned, with the tau and pvalue values.