I installed Statistics::Test::WilcoxonRankSum in redhat5 without any
error or warning message. Then I tried to run the example code in the
module (attached) and get an error message about undefined variable. I
added an initiation code, but still get the following error message.
The result is also different from that listed in the example code.
bmir-cluster /home/rchen1/project/disease_SNP 221 : test.pl
Probability: 0.091022, normal approx w. mean: 121.000000, std
deviation: 14.200939, z: -1.690029
Can't locate object method "probability_summary" via
package "Statistics::Test::WilcoxonRankSum" at test.pl line 26
I am eager to run some analysis using your module, which I believe is
extremely useful. Could you please help me to fix the bug?
Thank you so much.
Rong
Subject: | test.pl |
#!/usr/bin/perl
use Statistics::Test::WilcoxonRankSum;
my @dataset_1 = (4.6, 4.7, 4.9, 5.1, 5.2, 5.5, 5.8, 6.1, 6.5, 6.5, 7.2);
my @dataset_2 = (5.2, 5.3, 5.4, 5.6, 6.2, 6.3, 6.8, 7.7, 8.0, 8.1);
$wilcox_test = new Statistics::Test::WilcoxonRankSum;
$wilcox_test->load_data(\@dataset_1, \@dataset_2);
my $prob = $wilcox_test->probability();
my $pf = sprintf '%f', $prob; # prints 0.091022
$wilcox_test->probability_status();
# prints something like:
# Probability: 0.002797, exact
# or
# Probability: 0.511020, normal approx w. mean: 104.000000, std deviation: 41.840969, z: 0.657251
my $pstatus = $wilcox_test->probability_status();
# $pstatus is like the strings above
$wilcox_test->probability_summary();