Skip to content
Prev 257884 / 398502 Next

Multi-dimensional non-linear fitting - advice on best method?

Julian,

You have not specified your problem fully.  What is the nature of f?  Is f a scalar function or is it a vector function (2-dim)?

Here are some examples showing different possibilities:

(1) y1 = f + e1 = a + b*exp(-c*x) + e1; y2 = f + e2 = a + b*exp(-c*x) + e2; (e1, e2) ~ bivariate normal

(2) y1 = f + e1 = a + b*exp(-c*x) + e1; y2 = f + e2 = a + b*exp(-c*x) + e2; (e1, e2) ~ independently normal

(3) y1 = f1 + e1 = a1 + b1*exp(-c1*x) + e1; y2 = f2 + e2 = a2 + b2*exp(-c2*x) + e2; (e1, e2) ~ bivariate normal

(4) y1 = f1 + e1 = a1 + b1*exp(-c1*x) + e1; y2 = f2 + e2 = a2 + b2*exp(-c2*x) + e2; (e1, e2) ~ independently normal

For scenario (2), you form a single `y' vector by concatenating all the y1 and y2 and then do a single application of nls.  For (4), you do 2 separate nls runs, one for y1 and another for y2.  

For (1) and (3) you can do a likelihood maximization.

You have more scenarios where f1 and f2 can have different functional forms.  Which scenario is the one that you are considering?

Ravi.