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
 VisuaI difference between identical linear fits
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Enishn

1 Posts

Posted - 04/11/2017 :  08:10:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

can anyone explain why I get two different looking linear fit curves depending on at which point I perform the fit?

Mainly the problem is adding a break in order to show x=0 before displaying the main data in log/log scale.

When x = 0, y=802 and y-error=103.

I've tried two different methods to fit the line (without apparent fit).

A) Plot the data in log/log scale, the x=0,y=802 is included but not displayed. Fitting a linear curve creates a curve that fits nicely through the smallest data points. I then add a break to display zero in x-axis (scale before break = linear, after break = log10).

B) Plot the data in log/log scale, add break. Identical procedure to above, BUT, I apply the linear fitting after displaying zero. Now the line does not go through the lowest data points but above them.

All numerical output is identical (residual sum of squares, adj. R-square, pearson's r, intercept and slope and their SE). Option A yields visually more correct option, which is apparent from the point x=0.1, where the equation gives the value y=822 and at that point Option B's fit line has value of >1000. The only problem with option A is that the line doesn't reach x=0 although it's included in the fit.

I hope my explanation isn't too confusing, but I'm just wondering what the reason is and which is the correct way of fitting linear curve to the data? Thanks!

Version: Origin 2015 (64-bit) Sr2
OS: Windows 7


Edited by - Enishn on 04/11/2017 08:14:08 AM

YimingChen

1627 Posts

Posted - 04/11/2017 :  12:30:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Enishn,

The appearance of the fitted curve depends on how the x data of the fitted curve is generated. Go to Linear Fit dialog by clicking green lock and Change Parameter.... Under Fitted Curves Plot tab, besides X Data Type node, it shows the way X values is choose:

For option A, when you run the fitting, X Data are selected Use Source Graph Scale Type. x=0 point doesn't show on the graph, so it is not included. That's why you didn't see curve go through x=0 after adding the break. For option B, linear fit is run after adding the break. X data in the fitted curve is selected with Uniform Linear method, in which case x is evenly spaced from 1 to 1000. So the curve doesn't cross the second and third points in the log-scale plot.

--Yiming
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