[ https://issues.apache.org/jira/browse/MATH814?page=com.atlassian.jira.plugin.system.issuetabpanels:alltabpanel
]
Matt Adereth updated MATH814:

Attachment: kendallstau.patch
I've attached an implementation and tests of this using the algorithm described in William
R. Knight's 1966 paper "A Computer Method for Calculating Kendall's Tau with Ungrouped Data"
in the Journal of the American Statistical Association.
I've never contributed before, so apologies if there's anything I should be doing differently.
I have signed and submitted the contributer agreement.
I'm looking forward to some feedback and hopefully getting this in... thanks!
> Kendalls Tau Implementation
> 
>
> Key: MATH814
> URL: https://issues.apache.org/jira/browse/MATH814
> Project: Commons Math
> Issue Type: New Feature
> Affects Versions: 4.0
> Environment: All
> Reporter: devl
> Labels: correlation, rank
> Fix For: 4.0
>
> Attachments: kendallstau.patch
>
> Original Estimate: 840h
> Remaining Estimate: 840h
>
> Implement the Kendall's Tau which is a measure of Association/Correlation between ranked
ordinal data.
> A basic description is available at http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient
however the test implementation will follow that defined by "Handbook of Parametric and Nonparametric
Statistical Procedures, Fifth Edition, Page 1393 Test 30, ISBN10: 1439858012  ISBN13: 9781439858011."
> The algorithm is proposed as follows.
> Given two rankings or permutations represented by a 2D matrix; columns indicate rankings
(e.g. by an individual) and row are observations of each rank. The algorithm is to calculate
the total number of concordant pairs of ranks (between columns), discordant pairs of ranks
(between columns) and calculate the Tau defined as
> tau= (Number of concordant  number of discordant)/(n(n1)/2)
> where n(n1)/2 is the total number of possible pairs of ranks.
> The method will then output the tau value between 1 and 1 where 1 signifies a "perfect"
correlation between the two ranked lists.
> Where ties exist within a ranking it is marked as neither concordant nor discordant in
the calculation. An optional merge sort can be used to speed up the implementation. Details
are in the wiki page.
> Although this implementation is not particularly complex it would be useful to have it
in a consistent format in the commons math package in addition to existing correlation tests.
Kendall's Tau is used effectively in comparing ranks for products, rankings from search engines
or measurements from engineering equipment.

This message was sent by Atlassian JIRA
(v6.1#6144)
