sub SpearmanCorrelation
{
my ($Probe1,$Probe2)=@_;
my $c=Statistics::RankCorrelation->new($probehash{$Probe1},$probehash{$Probe2},sorted=>1);
$data = $probehash{$Probe1};
my $corr_value=$c->spearman;
my $ZValue = 0.5*log((1.0+$corr_value)/(1.0-$corr_value));
$ZValue = $ZValue*sqrt(@$data-2);
my $corrPValue = 2.0*(1.0 - pnorm(abs($ZValue)));
return(\$corr_value,\$corrPValue);
}
No comments:
Post a Comment