Re: power law fit with a constant [message #92844 is a reply to message #92843] |
Thu, 10 March 2016 10:25  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Thursday, March 10, 2016 at 12:40:38 PM UTC-5, Craig Markwardt wrote:
> On Wednesday, March 9, 2016 at 11:39:29 AM UTC-5, wlandsman wrote:
>> On Tuesday, March 18, 2014 at 10:13:47 PM UTC-4, suruchi wrote:
>>> Could anyone suggest me how to do the fitting of the following functions:
>>>
>>> 1) A + B (x^gamma) which is a power law with a constant.
>>>
>>> without the constant, for the power law of the form " Bx^gamma " it is easy to convert to log space and linearize the problem, that is
>>> log(y)=log(B)+gamma*(log(x)).
>>
>> I am trying to fit a power law without the constant term to data. As noted above, and also at
>> http://www.exelisvis.com/Support/HelpArticlesDetail/TabId/21 9/ArtMID/900/ArticleID/2813/2813.aspx
Thanks Craig. Yeah, I've come to the same conclusion. I even thought of splitting the data and using the nonlinear fit when any of the signal is negative, and using the much faster linear algorithm when the signal is all positive. But as you say the weighting would be much different in the two cases.
I am actually not interested in the coefficients of the fit. Instead, I want to evaluate the signal in my detector after 7 hours of decay. Because the data are so noisy, I want to use all the information contained in the ~100 data points measured during the power law decay, and not just interpolate a few points near 7 hours. Hmmm, maybe a spline fit would work just as well for this purpose as fitting a power-law? I need to study this a bit more. --Wayne
>> one can convert to log space and linearize the problem. This is very nice because linear fits can be vectorized and I can do a million linear fits in one vector call.
> ...
>
> Wayne, the fit is "linear" in the values, but non-linear if one considers the error bars. That would not be a large problem if the significance of the data was always large, but since you mention negative values, some of your values must be very low significance. I think you need to do a non-linear fit to capture the errors properly.
>
> Craig
|
|
|