[SciPy-User] ODR fitting several equations to the same parameters

ms devicerandom@gmail....
Thu Nov 12 05:35:50 CST 2009

Hi Bruce,

Thanks for your reply but there are several things I don't really grasp:

Bruce Southey ha scritto:
> On 11/11/2009 10:26 AM, ms wrote:
>> Let's start with a simple example. Imagine I have several linear data
>> sets y=ax+b which have different b (all of them are known) but that
>> should fit to the same (unknown) a. To have my best estimate of a, I
>> would want to fit them all together. In this case it is trivial, you
>> just subtract the known b from the data set and fit them all at the same
>> time.
> Although b is known without error you still have potentially effects due 
> to each data set.
> What I would do is fit:
> y= mu + dataset + a*x + dataset*a*x
> Where mu is some overall mean,

Mean of what? The b's?

> dataset is the effect of the ith dataset - allows different intercepts 
> for each data set
> dataset*a is the interaction between a and the dataset - allows 
> different slopes for each dataset.

I don't really understand what quantities you mean by "effect" and
"interaction", and why should I want to allow different slopes for each
dataset -the aim to fit one and only one slope from all datasets.

> Obviously you first test that interaction is zero. In theory, the 
> difference between the solutions of dataset should equate to the 
> differences between the known b's.

...same as above...

> Now you just expand your linear model to nonlinear one. The formulation 
> depends on your equation. But really you just replace f(a*x) with 
> f(a*x+dataset*a*x).
> So I first try with a linear model before a nonlinear. Also I would see 
> if I could linearize the non-linear function.

Well, the function is for sure non linear (it has a sigmoidal shape). To
linearize it is a good idea but I am doubtful it is doable.



More information about the SciPy-User mailing list