how to use NonlinearRegress w. NDSolve model?

• To: mathgroup at smc.vnet.net
• Subject: [mg21066] how to use NonlinearRegress w. NDSolve model?
• From: "John S. Paschkewitz" <paschkjs at vaa.wpafb.af.mil>
• Date: Sun, 12 Dec 1999 23:51:30 -0500 (EST)
• Organization: AFRL/VAAC
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

I am trying to fit a model defined by a set of 10 or so coupled 1st
order non-linear ODEs to some experimental data.  There are several
constants in the ODEs that I am trying to obtain by non-linear fitting
to several sets of data simultaneously.   I have a large number of data
sets with varying initial conditions.

I've used the FindMinimum method suggested on the Wolfram website to fit
the model to the data and have had pretty good success with it.
However, I'd really like to get some more descriptive statistics on the
quality of the fit.  Is there any way to use NonlinearRegress with the
model I've got?

Some example inputs are:

ssA1[k3_?NumberQ, k9_?NumberQ, k16_?NumberQ] :=
Block[{solA1, d},
solA1 = NDSolve[{de1, de2, de3, de4, de5, de6, de7, de8, de9, de10,
de11,
de12, de13, A1a0, A1b0, A1c0, A1d0, e0, f0, g0, h0, i0, j0,
A1k0,
A1l0, m0}, {a, b, c, d, e, f, g, h, i, j, k, l, m}, {t, 0,
0.4}][[1]]; Plus @@ Apply[(d[#1] - #2)^2 &, dataA1, {1}] /.
solA1]

ssA3 and ssA5 are defined similarly.  Each one is fitted against a
different data set for a different set of i.c.'s.

FindMinimum[(ssA1[k3, k9, k16] + ssA3[k3, k9, k16] + ssA5[k3, k9, k16]),
{k3,
7.0*^-15, 1.0*^-14}, {k9, 3.0*^-11, 3.0*^-10}, {k16, 3.0*^-10,
5.0*^-10},  MaxIterations -> 200]

I've tried to use:

<< Statistics`NonlinearFit`
NonlinearRegress[{{dataA1},{dataA3},{dataA5}},  (ssA1[k3, k9, k16] +
ssA3[k3, k9, k16] + ssA5[k3, k9, k16]), {k3,k9,k16}, {k3,     7.0*^-15,
1.0*^-14}, {k9, 3.0*^-11, 3.0*^-10}, {k16, 3.0*^-10,
5.0*^-10},  MaxIterations -> 200]

but this just returns my input.

I've only been using Mathematica for a couple of weeks, so I'd
appreciate any suggestions.

Thanks,
John

John Paschkewitz
Research Engineer
AF Research Laboratory
WPAFB, OH 45433

```

• Prev by Date: discrepancy in Hypergeometric1F1 results
• Next by Date: Re: NonLinearFit
• Previous by thread: discrepancy in Hypergeometric1F1 results
• Next by thread: Re: how to use NonlinearRegress w. NDSolve model?