Author |
Topic  |
|
cosy
Germany
Posts |
Posted - 12/16/2005 : 06:06:17 AM
|
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
|
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
|
 |
|
|
Topic  |
|
|
|