Re: Simultaneous nonlinear Regression of two data sets

• To: mathgroup at smc.vnet.net
• Subject: [mg19469] Re: [mg19440] Simultaneous nonlinear Regression of two data sets
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Sat, 28 Aug 1999 15:53:01 -0400
• References: <199908250525.BAA24759@smc.vnet.net.>
• Sender: owner-wri-mathgroup at wolfram.com

```Christopher Mack wrote:
>
> Hello,
>
> I want to fit two (if it works, I also want to fit threee and four)
> mathematical functions to two (in future perhaps three and four) data
> sets (gaussian
> profiles); each function has eight parameters to fit, but four of them
> are the same for all functions.
>
> I first thought of using the Mathematica-Function "NonlinearRegress";
> but after reading the Online-help I assumed that it only can fit
> one function to one data set.
>
> Is there a functino implemented into Mathematica, which can solve the
> described problem ?
>
> Thanks,
>
> Christopher Mack,
>
> Department of Chemical Process Engineering,

You might set it up as one large sum-of-squares to minimize in terms of
parameters. For a simple example, say you have a model function of the
form

Exp[a*x] + b*x

with data points {x11,y11}, {x12,y12}, ... {x1m, y1m}

and another of the form

x^a + Log[c+x]

with data points {x21,y21}, {x22,y22}, ... {x2n, y1n}

(note that we are insisting one parameter be the same for both
functions).

Then as a reasonable approach you might minimize over {a,b,c} the sum

(Exp[a*x11] + b*x11 - y11)^2 + ... + (Exp[a*x1m] + b*x1m - y1m)^2 +
(x21^a + Log[c+x21] - y21)^2 + ... + (x2n^a + Log[c+x2n] - y2n)^2

Also, if you can recast as a linear least-squares problem (say, by
taking logarithms) then all the better.

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Behavior of Array[]
• Next by Date: Re: ReplaceAll in If Statement
• Previous by thread: Simultaneous nonlinear Regression of two data sets
• Next by thread: Re: Simultaneous nonlinear Regression of two data sets