Login  Register

Re: Power Curve fitting SLope and intercept different than Excel

Posted by Sharad Bansal on May 20, 2011; 2:02pm
URL: http://imagej.273.s1.nabble.com/Power-Curve-fitting-SLope-and-intercept-different-than-Excel-tp3684501p3684504.html

Thanks Michael,
     The second method method did the trick. It is same as excel if I follow the 2nd approach.

Thanks,

Sharad Bansal
     Development Manager, Servigistics India
 Servigistics Development India Pvt. Ltd.
     604-607, 6th Floor, Tower B, Unitech Cyber Park
     Sector 39, Gurgaon, Haryana - 122001
M: +91.9953758832
F: +91.124.4763555
www.servigistics.com


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid
Sent: Friday, May 20, 2011 2:18 AM
To: [hidden email]
Subject: Re: Power Curve fitting SLope and intercept different than Excel

Hi Sharad, Michael,

when fitting an exponential y=a*exp(b*x), you have two options:

(1) Minimize least squares between the experimental y values and those
from the equation. That's what ImageJ does.

(2) Take the logarithm of y, then fit a straight line, minimizing the
square deviation of the logarithms:
  ln y = ln a + b*x
Many programs do it this way. If you want to get this result from ImageJ,
simply calculate the logarithm of your y values, do a linear fit, and take
exp of the intercept as 'a' value.

Similar for power laws, y = a x^b: Many programs do a linear regression of
the logarithms, i.e., minimizing the mean square deviation of the
logarithms:
ln y = ln a + b ln x

Michael
___________________________________________________________


On Thu, May 19, 2011 20:11, Cammer, Michael wrote:

> Years ago, when trying to fit time correlated FLIM data, we found that
> Excel was really, really wrong. [For single exponential decay, ImageJ was
> great.]
>
> And even if you dismiss my judgment as really really wrong, certainly
> Excel's algorithms are different.
>
> -Michael
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Sharad Bansal
> Sent: Thursday, May 19, 2011 12:49 PM
> To: [hidden email]
> Subject: Power Curve fitting SLope and intercept different than Excel
>
> Hi,
>     We are using the ij Curvefitrter class and using it for fitting curve
> using linear and power options. While linear fitting gives back the
> slope and intercept values same as when we add trendline to same set
> of data in Excel and get equation nfrom excel for slope and intercept,
> in case of power fitting, the values are different than the ones
> coming from trendline equation generated in Excel for same set of
> data.
>
> Is this a known issue in CurveFitter or Excel? I need an answer quickly
> for this,kindly help.
>
> Thanks,
> Sharad
>