| Library: | stats |
| See also: | corr relation |
| Macro: | rankcorr | |
| Description: | computes rank correlation coefficients according to Spearman and Kendall. In the case of ties, corrected versions are comptuted. |
| Usage: | rc = corr (x {,opt}) | |
| Input: | ||
| x | n x 2 matrix, the data. | |
| opt | string, either "spearman" or "kendall". | |
| Output: | ||
| rc | rank correlation between the columns of x. | |
library("stats")
randomize (0)
x = normal (200, 2)
rankcorr (x, "spearman")
rankcorr (x, "kendall")
x = (1:7)~(7:1)
rankcorr (x, "spearman")
rankcorr (x, "kendall")
Contents of rc [1,] -0.00040501 Contents of rc [1,] -0.0001005 Contents of rc [1,] -1 Contents of rc [1,] -1
| Library: | stats |
| See also: | corr relation |