I'm trying to code up the spearman correlation coefficient test of R in C++.
> x = runif(100)
> y = runif(100)
> cor.test(x,y, method="spearman")
Spearman's rank correlation rho
data: x and y
S = 165182, p-value = 0.9306
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.008808881
I manage to get S and rho, but I cannot find any documentation to go from S to the pvalue. Is there any GSL distribution I can use for this? BTW, I don't want to test significance using Student's t distribution or permutations.
Thanks!