|
[Date Index]
[Thread Index]
[Author Index]
Re: nonlinearmodelfit problem
- To: mathgroup at smc.vnet.net
- Subject: [mg126031] Re: nonlinearmodelfit problem
- From: Darren Glosemeyer <darreng at wolfram.com>
- Date: Fri, 13 Apr 2012 04:51:37 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201204112215.SAA02632@smc.vnet.net>
On 4/11/2012 5:15 PM, 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
>
You will probably want to use the Weights option in some way, but what
it is set to will depend on the precise meaning of "normalized
residuals". If the desire is to put the contributes to the model on
similar scales, you might use 1/yValuesFromTheData or use
1/Mean[yValuesFromFirstDataSet] for points from the first data set and
1/Mean[yValuesFromSecondDataSet] for points from the second data set.
If you want to scale based on error variation from the two sets and
models, you might get an approximation for the error variations by
fitting the two models separately, and then use
1/model1["ErrorVariance"] to weight the data points from the first data
set and 1/model2["ErrorVariance"] to weight the data points from the
second data set when fitting together, where model1 and modl2 are the
separate fittings for the first and second data sets respectively.
Darren Glosemeyer
Wolfram Research
Prev by Date:
Re: Replace each f in f^n to different variables
Next by Date:
Re: What characters are allowed in mathematica variable names? i.e. how
Previous by thread:
nonlinearmodelfit problem
Next by thread:
Re: nonlinearmodelfit problem
|