The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Statistics::MVA::HotellingTwoSample - Two-Sample Hotelling's T-Square Test Statistic.

VERSION

This document describes Statistics::MVA::HotellingTwoSample version 0.0.1

SYNOPSIS

    use Statistics::MVA::HotellingTwoSample;

    # we have two groups of data each with 3 variables and 10 observations - example data from http://www.stat.psu.edu/online/courses/stat505/data/insect.txt
    my $data_X = [
        [qw/ 191 131 53/],
        [qw/ 185 134 50/],
        [qw/ 200 137 52/],
        [qw/ 173 127 50/],
        [qw/ 171 128 49/],
        [qw/ 160 118 47/],
        [qw/ 188 134 54/],
        [qw/ 186 129 51/],
        [qw/ 174 131 52/],
        [qw/ 163 115 47/],
    ];

    my $data_Y = [
        [qw/ 186 107 49/],
        [qw/ 211 122 49/],
        [qw/ 201 144 47/],
        [qw/ 242 131 54/],
        [qw/ 184 108 43/],
        [qw/ 211 118 51/],
        [qw/ 217 122 49/],
        [qw/ 223 127 51/],
        [qw/ 208 125 50/],
        [qw/ 199 124 46/],
    ];
    
    # Create a Statistics::MVA::HotellingTwoSample object and pass the data as two Lists-of-Lists within an anonymous array.
    my $mva = Statistics::MVA::HotellingTwoSample->new([ $data_X, $data_Y ], {standardise => 0});

    # Generate results and print a report to STDOUT by calling hotelling_two_sample in void context.
    $mva->hotelling_two_sample;

    # Call hotelling_two_sample in LIST-context to access the results directly.
    my ($T2, $F, $pval, $df1, $df2) = $mva->hotelling_two_sample;

DESCRIPTION

Hotelling's T-square statistics is a generalization of Student's t statistic that is used for multivariate hypothesis testing.

DEPENDENCIES

'Statistics::MVA' => '0.0.1', 'Carp' => '1.08', 'Statistics::Distributions' => '1.02',

BUGS AND LIMITATIONS

Let me know.

AUTHOR

Daniel S. T. Hughes <dsth@cantab.net>

LICENCE AND COPYRIGHT

Copyright (c) 2010, Daniel S. T. Hughes <dsth@cantab.net>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

Because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the software "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.

In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages.