fitting linear region in a semi-log plot
proland
I am following an analysis for my data in which fitting a "linear region" of a semi-log plot can provide some important parameters. Now, the data can be depicted as y vs x with the left axis set to Log (to identify the fit region), and then fit to an equation of f(x) = 10^(m*x +b). The result will depict a linear region of the semi-log plot.
Now, the reported fit parameters, m and b, are related to, but are not the slope and intercept of this "linear line". How can I have the fitting routine report the slope and y-intercept of the "linear region" of the semi-log plot.
Would it be possible to modify the data wave I am fitting and then simply proceed with a normal linear fit?
logydata = log(ydata)
But I think you know that already!
Fitting the transformed data implies that the measurement errors in Y are proportional to the Y values. That is, as the Y values decrease, so do the errors. If the errors have constant variance in Y, then fitting the transformed data will introduce bias.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 31, 2014 at 01:59 pm - Permalink
Attached is an experiment file containing wave0=f(x) and log_wave0= log(f(x)). Wave0 is fit to 10^(m*x+b) on a semi-log plot. The y-intercept, visually is 10^-5 and this is the number which I wish to be reported (not the b=-5 value reported from the fit), along with the slope as decades/deltax. I could write up a script to preform the fit quietly and post-process the intercept and slope but I was wondering if there would be some way to instead write a fitting function which reports the values of interest since I have a large number of waves to process.
I'm not sure how to scale the reported slope m to extract the "Decades / delta_x " slope that I require for the analysis. A usable number should be something like 1e-6.
April 1, 2014 at 10:52 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
April 1, 2014 at 01:37 pm - Permalink