[R] spearman rank correlation
kjetil brinchmann halvorsen
kjetil at entelnet.bo
Thu Jan 23 04:29:02 CET 2003
On 23 Jan 2003 at 11:27, David Alexander wrote:
Did ypu try to use cor.test?
> example(cor.test)
cr.tst> x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2,
60.1)
cr.tst> y <- c(2.6, 3.1, 2.5, 5, 3.6, 4, 5.2, 2.8, 3.8)
cr.tst> cor.test(x, y, method = "kendall", alternative = "greater")
Kendall's rank correlation tau
data: x and y
T = 26, p-value = 0.05972
alternative hypothesis: true tau is greater than 0
sample estimates:
tau
0.4444444
It seems to be called tau rather than rho, but that should be good
enough.
Kjetil Halvorsen
> hello help,
>
> i've searched through the manual pages and the only reference i can find to spearman rank correlation is cor.test, which only seems to give the significance value of the correlation.
>
> is there any way to get the actual value of rho?
>
> david.
>
> [[alternate HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list