search.cpan.org is shutting down
Martin Lee > Statistics-KruskalWallis > Statistics::KruskalWallis

Statistics-KruskalWallis-0.01.tar.gz

Dependencies

Annotate this POD

# CPAN RT

 New 1 Open 0
View/Report Bugs
Module Version: 0.01

# NAME

Statistics::KruskalWallis - Perl module to perform the Kruskall-Wallis test, use to test if differences exist between 3 or more independant groups of unequal sizes.

Also includes the post-hoc Newman-Keuls test, to test if the differences between pairs of the tested group are significant.

# SYNOPSIS

```    use Statistics::KruskalWallis;
use strict;

my @group_1 = (6.4,6.8,7.2,8.3,8.4,9.1,9.4,9.7);
my @group_2 = (2.5,3.7,4.9,5.4,5.9,8.1,8.2);
my @group_3 = (1.3,4.1,4.9,5.2,5.5,8.2);

my \$kw = new Statistics::KruskalWallis;

my (\$H,\$p_value) = \$kw->perform_kruskal_wallis_test;

print "Kruskal Wallis statistic is \$H\n";
print "p value for test is \$p_value\n";```

#post hoc my (\$q,\$p) = \$kw->post_hoc('Newman-Keuls','group 1','group 3'); print "Newman-Keuls statistic for groups 1,3 is \$q, p value \$p\n";

```   (\$q,\$p) = \$kw->post_hoc('Newman-Keuls','group 1','group 2');
print "Newman-Keuls statistic for groups 1,2 is \$q, p value \$p\n";

(\$q,\$p) = \$kw->post_hoc('Newman-Keuls','group 2','group 3');
print "Newman-Keuls statistic for groups 2,3 is \$q, p value \$p\n";```

# DESCRIPTION

This module performs the Kruskal Wallis statistical test on data. It takes 3 or more groups of independant data of unequal size, and tests the null hypothesis, that the mean ranks of the groups do not differ.

The facility to perform post-hoc tests on the groups to test differences between pairs of groups is included. So far only the Newman-Keuls test is included, hopefully further tests will be included.

# AUTHOR

Martin Lee, Star Technology Group (mlee@startechgroup.co.uk) copyright (c) 2003 Star Technology Group Ltd.

syntax highlighting: