# How to obtain p-values for a given Kendall's Tau value (not calculated from data)

I want to obtain p-values for Parker's Tau-U (Parker et al., 2011). which is a measure based on Kendall's Tau.

Tau-U is related to Kendall's Tau in such a way that it's possible to translate a Tau-U value to a Kendall's Tau value.

This means that I can use the Kendall() function in the Kendall package in R to compute p-values for Tau-U. The only problem is that the Kendall() function only accepts two equal length data vectors for which it computes Kendall's Tau. However, I want to input a Kendall's Tau value directly (the Tau-U value expressed as a Kendall's Tau value) and then obtain a p-value for it.

Does any know if there are any R-functions that will allow me to input a Kendall's Tau value directly? There is other (non-free) software available that will do this for me (e.g. StatsDirect) but I need to find a way in R because I need the p-values for implementation in a permutation test (based on my own code).

Regards. Bart

• Without knowledge of the sample size, it is not possible even to provide some reasonable approximation. – Michael M Jul 28 '15 at 16:52

My initial answer was incorrect as pointed out by Silverfish. After some review of the tau variations and looking at the paper the test statistic is calculated independently from the tau value. As such, it doesn't appear to be possible to directly use the tau value to calculate the p-value. You will need to calculate the statistic from the data. You will therefore need to review the paper to see how the calculation of the statistic differs from the other tau variations.

• I would add that although the original answer was incorrect, it still might be instructive to have a look at what R is doing when it finds the p-value for Tau; as @cdeterman said in his first answer, this can be done using getAnywhere(cor.test.default) – Silverfish Dec 9 '14 at 21:59
• Thanks, that's a very good suggestion. I think i'm able to construct a function that does what I want from the source code from cor.test(). I only have one problem: at one point in the source code there is this line: pkendall <- function(q, n) .Call(C_pKendall, q, n) . However I can't seem to get the .Call(C_pKendall, q, n) working. Whenever I execute this line, R says that he can't find C_pKendall. Does anyone have any advice on how to fix this? It appears to be a function that is being called from C. – Bart Dec 10 '14 at 9:07