Statistics::Associations - Calculates Association Coefficients of Nominal Scale.
use Statistics::Associations; my $asso = Statistics::Associations->new; # Basic Methods # calculates coefficients my $matrix = [ [ 6, 4 ], [ 5, 5 ] ]; my $phi = $asso->phi($matrix); my $contingency = $asso->contingency($matrix); my $cramer = $asso->cramer($matrix); # ------------------- # Helper Methods # it helps you to making matrix while(<STDIN>){ my $row_label = ...; my $col_label = ...; my $value = ...; $asso->make_matrix( $row_label, $col_label, $value ); } my $matrix = $asso->matrix; # convert to hash_ref my $hash_ref = $asso->convert_hashref;
Statistics::Associations is a calculator of Association Coefficients that specialized in 'Nominal Scale'.
It calculates next three coeffients.
* phi * contingency * cramer
And it calculates chi-square, too.
And then, it helps you to making matrix in a loop that looks like parsing logs.
takeshi miki <miki@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Statistics::Associations, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statistics::Associations
CPAN shell
perl -MCPAN -e shell install Statistics::Associations
For more information on module installation, please visit the detailed CPAN module installation guide.