I have this bivariate data:
x=(7.1,7.1,7.2,8.3,9.4,10.5,11.4)
y=(2.8,2.9,2.8,2.6,3.5,4.6,5.0)
I want to examine the relationship between x and y by using Spearmans correlation coefficient (R computes: r=0.7). And I want to test the value of the correlation coefficient for significance. The null hypothesis is: rho = 0 (two sided test), which means no relationship. The following R-Code computes an approximate p-value of 0.07992:
cor.test(x,y,method="spearman")
But R gives me the following warning: No exact p-value because of ties.
Now I want to compute a permutation test to get the exact p-value (for alpha=0.05, two sided). I looked it up on the Internet and I think it should be possible with the package "coin". But I have no idea how to do this.
I found already the following solution:
library(coin)
spearman_test(y~x,distribution=approximate(B=9999))
R computes a p-value of 0.08641. But I am not sure, if this is correct. I want to find an exact p-value and not an approximate one.
I would be really grateful, if anybody could help me.