Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9559 > unrolled thread

nonlinearmodelfit problem

Started by"L. Mattera" <mattera@fisica.unige.it>
First post2012-04-11 22:16 +0000
Last post2012-04-18 07:53 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  nonlinearmodelfit problem "L. Mattera" <mattera@fisica.unige.it> - 2012-04-11 22:16 +0000
    Re: nonlinearmodelfit problem "M.Roellig" <markus.roellig@googlemail.com> - 2012-04-17 10:03 +0000
    Re: nonlinearmodelfit problem "Dan O'Brien" <danobrie@gmail.com> - 2012-04-18 07:53 +0000

#9559 — nonlinearmodelfit problem

From"L. Mattera" <mattera@fisica.unige.it>
Date2012-04-11 22:16 +0000
Subjectnonlinearmodelfit problem
Message-ID<jm4vr2$2j0$1@smc.vnet.net>
Hi
my name is Lorenzo Mattera, I am using since a short time Mathematica.
I am trying to solve a fitting problem where two sets of data have to be 
fitted by two models depending on the same parameters.
I found very helpful the suggestions reported at
http://forums.wolfram.com/mathgroup/archive/2011/Sep/msg00555.html (and 
references therein) so that I was able to
produce a working procedure. However, I have a "small" problem:
the two set of data have quite different weights as one is in the 
0-100000 range while the other is in the 0-1 range so that one of the two is
irrelevant in the fitting procedure.
It seems to me that NonlinearModelFit minimizes the sum of the squared 
residuals,
any way to minimize the squared  normalized residuals?
Perhaps is one of the options, but so far I could not find it.
Tank you for the help
best regards
L. Mattera

[toc] | [next] | [standalone]


#9677

From"M.Roellig" <markus.roellig@googlemail.com>
Date2012-04-17 10:03 +0000
Message-ID<jmjf4u$887$1@smc.vnet.net>
In reply to#9559
On Thursday, April 12, 2012 12:16:02 AM UTC+2, L. Mattera wrote:
> Hi
> my name is Lorenzo Mattera, I am using since a short time Mathematica.
> I am trying to solve a fitting problem where two sets of data have to be 
> fitted by two models depending on the same parameters.
> I found very helpful the suggestions reported at
> http://forums.wolfram.com/mathgroup/archive/2011/Sep/msg00555.html (and 
> references therein) so that I was able to
> produce a working procedure. However, I have a "small" problem:
> the two set of data have quite different weights as one is in the 
> 0-100000 range while the other is in the 0-1 range so that one of the two is
> irrelevant in the fitting procedure.
> It seems to me that NonlinearModelFit minimizes the sum of the squared 
> residuals,
> any way to minimize the squared  normalized residuals?
> Perhaps is one of the options, but so far I could not find it.
> Tank you for the help
> best regards
> L. Mattera

Hi,

you could try to fit in the logarithmic domain.

Markus

[toc] | [prev] | [next] | [standalone]


#9688

From"Dan O'Brien" <danobrie@gmail.com>
Date2012-04-18 07:53 +0000
Message-ID<jmlrth$jcd$1@smc.vnet.net>
In reply to#9559
I have had the same sort of problems.  How have you set up your 
simultaneous fit?  If it is set up so that your data is in the form

{{1,x11,y11},{1,x12,y12}......{2,x2n,y2n}}

where the first index is for the dataset (1 or 2)
and your function is set up with kroneckerdelta

nlm[dataset,x,parameters]:=KroneckerDelta[dataset-1]nlm1[parameters]+KroneckerDelta[dataset-2]nlm2[parameters]

Then you could use the Weights option in NonlinearModelFit

Weights->(If[#1==2,100000,1]&) (if the larger ranged dataset is dataset 1)

-Dan

On 4/17/2012 5:02 AM, M.Roellig wrote:
> On Thursday, April 12, 2012 12:16:02 AM UTC+2, L. Mattera wrote:
>> Hi
>> my name is Lorenzo Mattera, I am using since a short time Mathematica.
>> I am trying to solve a fitting problem where two sets of data have to be
>> fitted by two models depending on the same parameters.
>> I found very helpful the suggestions reported at
>> http://forums.wolfram.com/mathgroup/archive/2011/Sep/msg00555.html (and
>> references therein) so that I was able to
>> produce a working procedure. However, I have a "small" problem:
>> the two set of data have quite different weights as one is in the
>> 0-100000 range while the other is in the 0-1 range so that one of the two is
>> irrelevant in the fitting procedure.
>> It seems to me that NonlinearModelFit minimizes the sum of the squared
>> residuals,
>> any way to minimize the squared  normalized residuals?
>> Perhaps is one of the options, but so far I could not find it.
>> Tank you for the help
>> best regards
>> L. Mattera
> Hi,
>
> you could try to fit in the logarithmic domain.
>
> Markus
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web