[R] kendall tau distance

Ragia Ibrahim ragia11 at hotmail.com
Sat Sep 12 11:20:53 CEST 2015


many thanks for replying.
 I have the vectors
 running the code

ConDisPairs( data.frame(c(1,2,3,4,5),c(3,4,1,2,5)) ) 

$pi.c
     [,1] [,2]
[1,]   12    0
[2,]    8    1
[3,]    7    3
[4,]    5    6
[5,]    0   10

$pi.d
     [,1] [,2]
[1,]    0   14
[2,]    3   12
[3,]    7    9
[4,]    8    5
[5,]   10    0

$C
[1] 69

$D
[1] 109


I could not find the result related to the result at wiki page in any way..looking for 4 ? dissimilar pairs?

many thanks

----------------------------------------
> From: dcarlson at tamu.edu
> To: ragia11 at hotmail.com; r-help at r-project.org
> Subject: RE: [R] kendall tau distance
> Date: Fri, 11 Sep 2015 15:37:19 +0000
>
> The Wikipedia article gives a simple formula based on the number of discordant pairs. You can get that from the ConDisPairs() function in package DescTools.
>
> -------------------------------------
> David L Carlson
> Department of Anthropology
> Texas A&M University
> College Station, TX 77840-4352
>
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ragia Ibrahim
> Sent: Thursday, September 10, 2015 12:40 PM
> To: r-help at r-project.org
> Subject: [R] kendall tau distance
>
> Dear group
> how to calculate kendall tau distance according to Kendall_tau_distance at wikipedia
>
> <a href="https://en.wikipedia.org/wiki/Kendall_tau_distance" target="_blank" class="newlyinsertedlink">https://en.wikipedia.org/wiki/Kendall_tau_distance</a>
>
>
> thanks in advance
> Ragia
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
 		 	   		  


More information about the R-help mailing list