At Wed, 20 Jun 2007 09:34:29 -0700,
Jack Denman wrote:
> I remember from the "bad old days" a FORTRAN package that called
> statpack or statpac than started with linear regression and
> proceeded to increase the degree of the polynomial until there was
> no further reduction in the sum of the squares.

Hello,

I know the algorithm you mean, by Shampine, it's not currently
available in GSL though.

> Is there a way to run a cubic regression. My second degree
> regression was with the following calls from examples in the gsl
> HTML page.

You can extend the matrix X with an extra column for x**3 (or any
other term that you want to add to the fit),

   X = gsl_matrix_alloc (n, 4)
   ....
   gsl_matrix_set (X, i, 3, xi * xi * xi);

The corresponding sizes of the other vectors and matrices will also
need to be increased from 3 to 4.

-- 
Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/



_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to