lsquares



On 1/4/09, Jussi Eloranta <Jussi.Eloranta at csun.edu> wrote:

>  1) Is it possible to simultaneously fit multiple data sets with each
>  having its own fitting function in such a way that they share parameters?

Yes, if I understand correctly, you can construct a combined MSE
and then minimize that, something like:

  mse1 : lsquares_mse (data1, [a, b, c, d], equation1);
  mse2 : lsquares_mse (data2, [a, b, c, d], equation2);
  lsquares_estimates_approximate (mse1 + mse2, [a, b, c, d], ...);

Well, if data1 and data2 have different numbers of rows I guess you
want something like n1/(n1 + n2)*mse1 + n2/(n1 + n2)*mse2 for the
combined MSE.

>  2) Are there routines to calculate r^2, covariance matrix, standard
>  error estimates ?

r^2 you can obtain from lsquares_residual_mse.

There aren't any built-in functions for the covariance matrix or
standard error estimates.
I 'll put those on my to-do list (should be straightforward).

>          debug, neqs, i, sq, tmp, lbfgs_nfeval_max:1000, /* BFGS tends
>  to converge somewhat slowly... */

Do you want to suggest another minimization algorithm?

Thanks for your interest,

Robert Dodier