Statistics::MVA::MultipleRegression - Simple Least Squares Linear Multiple Regression Module.
This document describes Statistics::MVA::MultipleRegression version 0.0.1
my $lol = [ [qw/745 36 66/], [qw/895 37 68/], [qw/442 47 64/], [qw/440 32 53/], [qw/1598 1 101/], ]; use Statistics::MVA::MultipleRegression; # Call exported routine on List-of-List of data (each nested list - row - corresponds to a set of observations. In void-context it prints a report to STDOUT. linear_regression($lol); # In LIST-context the routine returns an ARRAY reference of the coefficients and R^2. my ($Array_ref_of_coefficients, $R_sq) = linear_regression($d);
The general purpose of multiple regression is to gain information about the relationship between several independent variables (x_i) and a dependent variable (y). The procedure involves fitting an equation of the form: y = b_o + x_1 * b_1 + x_2 * b_2 +... ... x_n * b_n This is a minimal implementation of least squares procedure that accepts a List-of-Lists in which each nested list corresponds to a single set of observations. The single exported routine returns the coefficients (b_i) and R^2.
'Carp' => '1.08', 'Statistics::MVA' => '0.0.1', 'List::Util' => '1.19', 'Math::MatrixReal' => '2.05',
Let me know.
Daniel S. T. Hughes <dsth@cantab.net>
<dsth@cantab.net>
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.
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.
To install Statistics::MVA::MultipleRegression, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statistics::MVA::MultipleRegression
CPAN shell
perl -MCPAN -e shell install Statistics::MVA::MultipleRegression
For more information on module installation, please visit the detailed CPAN module installation guide.