The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 definition of another merit function for fitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

frankwagner

France
Posts

Posted - 02/13/2007 :  09:48:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

is there a possibility to define another merit function for the nonlinear fitter? I mean for normally distributed measurements one fits by minimizing the Chi2 (eventuelly weighted).
I have data that obeys the binominal distribution and would like to fit it.

Thus I would need to redefine the merit function that has to be minimized. Can I do this in origin? Does somebody know another program that does it?

Thanks a lot for your help,

Frank


Origin Version (Select Help-->About Origin): 7.5 SR6
Operating System: Win XP

Mike Buess

USA
3037 Posts

Posted - 02/13/2007 :  10:49:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Frank,

I assume you mean binomial rather than binominal. Chi^2 is merely a measure of the deviation of predicted values from measured values and should work for any model. Why doesn't it work as merit function for binomial distribution?

BTW, duplicate posting is an unnecessary waste of the reader's time.

Mike Buess
Origin WebRing Member
Go to Top of Page

frankwagner

France
Posts

Posted - 02/15/2007 :  09:15:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

the reason why Chi^2 is usually a good merit function is because usual measurements are normally distributed around the average value. The probability to realize a measurement assuming a known value of y is expressed by the normal distribution shifted to the average of the measurement y_a. Thus the average is the best estimator for the value of y. For curve fitting, the y are generated by the fit model y_f(x,b) with a model parameter b. The probability that has to be optimized (realize all measurement points simultaneaously) is then given by something proportional to
Exp( -(y_f(x1,b)-y_a(x1))^2/sigma^2(x1) ) * Exp ( ... at position x2)
Maximising this expression by varying b results in minimizing:
(y_f(x1,b)-y_a(x1))^2/sigma^2(x1)+(y_f(x2,b)-y_a(x2))^2/sigma^2(x2)+...
this is the weighted Chi^2, or, if you set all sigma^2 values to the same value, it is proportional to the simple Chi^2.
We measure probabilities, thus the values are not normally distributed and the estimator is not given by the average... The initial gaussian of the normal distribution has to be replaced by the appropriate binomial distribution and Chi^2 is no longer a valid merit function.
However, using Origin instead of programming something by myself may safe time and make sure that the errors of the fit parameter b are correctely calculated. (In reality I would like to compare several models with 2 to 9 fit parameters)

FW
Go to Top of Page

easwar

USA
1965 Posts

Posted - 02/15/2007 :  11:14:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Frank,

The minimization algorithm in Origin works only on minimizing chi-sqr and there is no option to minimize a different entity.

We will need to look into this for a future version. Thank you for t he input.

Easwar
OriginLab

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000