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
 Correlation coefficient R^2 in NLSF
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

73659

USA
Posts

Posted - 11/13/2006 :  11:09:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): V7.5
Operating System: Windows XP

I know the definition of Correlation coefficient R^2 in linear fitting. What's its definition in nonlinear fitting (NLSF)? If the definitions are the same in both cases, the R^2 value of a given set of data will be the same, no matter what nonlinear functions we choose. But my trials using Origin show that the R^2 value change with the nonlinear function chosen.

zachary_origin

China
Posts

Posted - 11/13/2006 :  8:00:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is a link you can reference. http://www.originlab.com/forum/topic.asp?TOPIC_ID=5170

Zachary
OriginLab Technical Services.
Go to Top of Page

73659

USA
Posts

Posted - 11/16/2006 :  09:03:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks! I have two further questions"
(1) When we compare two NLSF results, should we use R^2 or Chi^2/DoF as the criterion? OR the two criterion are identical?
(2)There is also an "adjusted R-squared". What's the difference in their physical meaning between it and R^2?

Regards!
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/16/2006 :  10:51:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
(1) They are not identical but give similar information. The closer R-sqr is to 1 and Chi-sqr is to zero the better the fit.

(2) See the third item (COD) on this page of your Origin Reference...
http://www.originlab.com/www/helponline/origin/Fitting_to_a_Straight_Line_with_Intercept_Y=a+bX.htm

Mike Buess
Origin WebRing Member
Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/16/2006 :  1:25:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

(1) When we compare two NLSF results, should we use R^2 or Chi^2/DoF as the criterion? OR the two criterion are identical?



Hi,

There are statistical tests that compute a p-value to determine if one fit is better than the other. The kind of test and formula depends on whether you are comparing fitting two datasets with one equation or you are comparing fit results for two equations on one dataset.

For comparing fit to two datasets with one equation, Origin has a built-in Fit Comparison tool

There is currently no tool in Origin to compare fit to one dataset with two equations, but there is a free download on File Exchange that lets you do that:
http://originlab.com/FileExchange/details.aspx?fid=64

Hope the above helps. If you need more help please contact tech support.

Easwar
OriginLab


P.S. The Fit Comparison tool, accessible from the Tools menu, uses Origin C code and that code has a bug in current version. To fix the bug, do the following:
1> open code builder
2> open the file
<origin root folder>\OriginC\OriginLab\CompareFits.c
Go to line 176 and change it to:
double f2 = ssr_sep/dof_sep;
and save the file
3> Then next time you use the tool, this function will get compiled with the correction



Edited by - easwar on 11/16/2006 1:38:01 PM
Go to Top of Page

73659

USA
Posts

Posted - 11/16/2006 :  8:20:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Zachary and Easwar,

Thank you for your reply. I'm sorry that I didn't put my questions clearly enough. Let me put them as follows
(1)When I fit ONE dataset to ONE equation in a NLSF way, two different set of INITIAL values may lead to their respective best results. Is it possible that one result has a R^2 value closer to 1 and a higher Chi^2/DoF value than another? If yes, which one (1st, or 2nd) is better? or should we attach more importance to R^2 or to Chi^2/DoF?

(2) I know the definition and calculation of the adjusted R-squared. What I want to know is its physical meaning? i.e. what does it stand for?

Regards!
Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/16/2006 :  9:15:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

(1)When I fit ONE dataset to ONE equation in a NLSF way, two different set of INITIAL values may lead to their respective best results. Is it possible that one result has a R^2 value closer to 1 and a higher Chi^2/DoF value than another? If yes, which one (1st, or 2nd) is better? or should we attach more importance to R^2 or to Chi^2/DoF?



If you are getting two sets of parameters for the same dataset with the same function with two different initial values, I am not sure it is valid to then compare them. It is quite possible that neither solution is really converged. You may have an overparameterized function and/or your data and function may not be a good match. The dependency value for the parameters is usually high in such situations.

I suggest you send your data, your fitting function (if you have a user defined function), your two sets of initial parameters, and the final parameter values you get, to tech support so they can see what is going on.

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