Subject: | Patch for Kendall's Tau with tied ranks |
The bug was that tie pairs were being counted as discordant.
241,243c241,244
< if( sign( $self->{x_data}[$j] - $self->{x_data}[$i] ) ==
< sign( $self->{y_data}[$j] - $self->{y_data}[$i] )
< ) { $concordant++ }
---
Show quoted text
> my $x_sign = sign( $self->{x_data}[$j] -
$self->{x_data}[$i] );
Show quoted text> my $y_sign = sign( $self->{y_data}[$j] -
$self->{y_data}[$i] );
Show quoted text> if (! $x_sign || ! $y_sign) {}
> elsif ($x_sign == $y_sign) { $concordant++ }