Kendall's Tau
#Data from table 1, page 188
> x<-c(44.4,45.9,41.9,53.3,44.7,44.1,50.7,45.2,60.1)
> y<-c(2.6,3.1,2.5,5.0,3.6,4.0,5.2,2.8,3.8)
> rtoz<-function(r,rho,n){
O<-.5*log((1+r)/(1-r))
E<-.5*log((1+rho)/(1-rho))
Var<-1/(n-3)
return((O-E)/sqrt(Var))}
> cor.test(x,y,method="pearson")
Pearson's product-moment correlation
data: x and y
t = 1.8411, df = 7, p-value = 0.1082
alternative hypothesis: true coef is not equal to 0
sample estimates:
cor
0.5711815
> cor.test(x,y,method="kendall")
Kendall's rank correlation tau
data: x and y
normal-z = 1.6681, p-value = 0.0953
alternative hypothesis: true tau is not equal to 0
sample estimates:
tau
0.4444444