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 for Programming
 LabTalk Forum
 Statndard error of linear fit coefficients
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cosy

Germany
Posts

Posted - 12/16/2005 :  06:06:17 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): origin pro 7
Operating System:win xp
hi,
I made a linear fit to my data (using the menu) with 150 data point and it gave the coefficients as follows:
A 1.31649E6 32.80567
B -85.36555 0.95178

but when i made a linear fit by programming,
I got the output as:
STAT.PR.A=1316490
STAT.PR.ASE=0.1624862
STAT.PR.ASE/STAT.PR.A=1.234238E-7
STAT.PR.B1=-85.36555
STAT.PR.BSE1=0.00471415

while the actual value are correct, why are the errors different by a large margin? or have I misunderstood something?
Please clarify,
Regards,
COSY

easwar

USA
1965 Posts

Posted - 01/04/2006 :  11:11:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi COSY,

When fitting data without error bars by using the GUI such as the Fit Linear menu item, the LR, PR tool, or the NLSF tool etc, Origin scales the standard error by an additional factor which is sqrt(reduced chi-sq). This is recommended by Numerical Recipes and also is done in other products.

When programmatically using the stat object to do pr, this scaling is not being done, which is why you are seeing discrepancy between the error values from GUI and from directly using stat.pr

I see that if you use the stat.lr object instead of the stat.pr object to do the fit the scaling is done for you. Since you are doing linear fit you may want to consider using stat.lr instead of stat.pr

Otherwise you can also use the NLSF object and utilize the functions in the Polynomial category.

Hope this helps.

Easwar

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