CPAN Ratings: Reviews by Jonathan Thornburg
http://cpanratings.perl.org/dist/jthorn105
CPAN Ratings: Reviews by Jonathan Thornburgen-us2000-08-23T07:00+00:00ask@perl.orgask@perl.orgPerl1901-01-01T00:00+00:001dailyJonathan Thornburg
http://cpanratings.perl.org/dist/jthorn105#10621
<p>Rating: 3 stars</p><p>I have used Statistics::Regression in a couple of projects. I find it useful, but flawed.
<br><br>Advantages:
<br>
* provides most of the basic multivariate linear regression functionality, including getting standard errors for the fitted parameters
<br>
* does NOT hardwire a constant
<br>
* nice Perl API to add one point at a time (I haven't tried the provide-all-data-at-once API)
<br>
* provides linearcombination_variance()
<br>
* uses Gentleman's algorithm, which seems to be numerically quite robust
<br><br>Disadvantages
<br>
* documentation is a bit skimpy, e.g., it never explicitly says that the usage for include() is include(y, [x0,x1,x2,...,xk]), rather I had to reverse-engineer this from the examples
<br>
* does not seem to provide any way to get the covariance matrix of the fitted parameters
<br>
* no documentation at all for linearcombination_variance() :(
<br>
* doesn't offer any help in diagnosing problems caused by a linearly-dependent set of basis fns (this would require an SVD-based fit)
<br>
* There must be at least 2 independent variables -- attempting to do a regression with only a single independent variable [i.e., attempting to estimate the parameter c given a set of (x,y) data points and the model y = c*x ] yields a run-time error message that this isn't allowed. This restriction is unfortunate (the mathematical formalism is ok with 1 independent variable, and some applications generate N-variable fits where N isn't known in advance). What's worse, this restriction is undocumented.
<br><br>I have been using Statistics::Regression for about a year in an ongoing project (which totals around 2500 lines of Perl), and generally been fairly happy with it. (Not having a covariance matrix has been a bit awkward, but I could live with(out) it.)
<br><br>I haven't tried the fancy "pretty-print the regression" routines.
<br><br>Alas, I've just hit the "must have at least 2 independent variables" restriction, so it looks like I'll have to convert my code to use a different regression package (maybe Math::GSL::Multifit).</p>Jonathan Thornburg2012-12-11T00:52:48