3

As I understand, there are two ways to compute Kendall Tau for a data matrix $X$ (n rows of data points in $\mathbb{R}^p$):

  1. corr(X,'type','kendall')

  2. http://www.mathworks.com/matlabcentral/fileexchange/27361-weighted-kendall-rank-correlation-matrix/content/kendalltau.m

The latter works very, very fast for "small" $X$ (say 300x400). But it runs out of memory when $X$ is say $100\times 1000$. Corr() works very, very slowly in this setting. It can take even an hour sometimes.

Are there any better solutions? Ideally in Matlab, but perhaps in another language?

  • 2
    For unweighted correlations, the Wikipedia article on Kendall's tau answers this question. The cor.fk function in package pcaPP for R implements Simcha's algorithm and takes a fraction of a second with a $100\times 1000$ matrix. However, the link in (2) suggests a weighted version is sought. Is that the case? – whuber Jun 29 '14 at 16:28
  • I've deleted my tentative answer. Since computing this takes a fraction of a second, I think the premises of the question, as formulated, are wrong. – user603 Jun 29 '14 at 19:05
  • So this can't work in matlab? As I understand it this is based on opaque (to me) C code. – Lepidopterist Jun 29 '14 at 19:41
  • 1
    @GregorianFunk: but the code is wrapped in a user friendly FOSS language: R. – user603 Jun 29 '14 at 22:16

0 Answers0