Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: stats
See also: corr relation

Quantlet: rankcorr
Description: computes rank correlation coefficients according to Spearman and Kendall. In the case of ties, corrected versions are computed.

Reference(s):

Usage: rc = rankcorr (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.

Note:

Example:
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")

Result:
Contents of rc
[1,] -0.00040501
Contents of rc
[1,] -0.0001005
Contents of rc
[1,]       -1
Contents of rc
[1,]       -1



Author: Marlene Mueller, 990218
(C) MD*TECH Method and Data Technologies, 05.02.2006