Re: NonLinearRegress Problem

• To: mathgroup at smc.vnet.net
• Subject: [mg68366] Re: NonLinearRegress Problem
• From: Peter Pein <petsie at dordos.net>
• Date: Thu, 3 Aug 2006 06:06:22 -0400 (EDT)
• References: <eapr5l\$s0h\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```jour schrieb:
> I have the following problem with NonLinearRegress
>
> I have defined the following function
>
> deb[teta_,n_,t]:= 9 n (t/teta)^3 Nintegrate[(x^4
> Exp[x])/(1+Exp[x])^2,{x,0,t/teta}]
>
> I can Table this function without problem
>
> Table[{t, deb2[100, 3, t]}, {t, 1, 200, 5}]
>
> but when I try to use this function in NonlinearRegress
>
> fut = NonlinearRegress[dat,
> deb2[teta, n, t],
> {t}, {{teta, {10., 50.}, 0., 1000.}, {n, {1, 3}, 1, 70}}]
>
> I get an error message
>
> NIntegrate::"nlim"  t/teta is not a valid limit of integration
>
> any suggestions ?
>
bon(jour)^2

1.) what is deb2?
2. & 3.) deb[teta_,n_,t_]:=...NIntegrate[...]
^^^     ^^^
4.) either use
(*I recommend this *)
deb2[teta_,n_,t_]= 9 n (t/teta)^3 *Integrate[(x^4 Exp[x])/(1+Exp[x])^2,{x,0,t/teta}]

or

ndeb2[teta_,n_,t_]:= 9 n (t/teta)^3 *NIntegrate[(x^4 Exp[x])/(1+Exp[x])^2,{x,0,t/teta}]/;And@@(NumericQ/@{teta,n,t})

When naming the table from your posting dat, the ndeb2 version needs 13 seconds on my computer to complete

fut = NonlinearRegress[dat, deb2[teta, n, t], {t},
{{teta, {10, 300}, 0, 1000}, {n, {1, 8}, 1, 70}}]

and the exact version needs ~178 seconds.

*But* NonlinearRegress can't find the derivatives of the model ndeb2 and therefore calculates only BestFitParameters, EstimatedVariance and ANOVATable.

Peter

```

• Prev by Date: Re: Strange problem with "for" and "while"
• Next by Date: Re: find area bounded by three linear functions
• Previous by thread: Re: NonLinearRegress Problem
• Next by thread: Re: NonLinearRegress Problem