comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » LINFIT CHISQ and SIGMA values are correct??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: LINFIT CHISQ and SIGMA values are correct?? [message #91604 is a reply to message #91603] Wed, 05 August 2015 00:23 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
I think that what he's saying is:

if f(x) = log_b(x) then f'(x) = 1/(x ln(b)) where b is the base of the logarithm. In your case, you're using IDL's alog10(). So the derivative of the function f(x) = alog10(x) is f'(x) = 1/(x*alog(10)) and can be rewritten as:
f'(x) = 0.434/x

So 0.434 = 1/alog(10)

I hope it helps.

Cheers,
Helder

PS: In case you're unsure what or why the step from z=alog10(y) to dz=0.434*dy/y was taken, then you should look at error propagation and differentials. Here are some google result I found: http://tutorial.math.lamar.edu/Classes/CalcI/Differentials.a spx
http://www.rit.edu/cos/uphysics/uncertainties/Uncertaintiesp art2.html


On Wednesday, August 5, 2015 at 9:08:05 AM UTC+2, Krishnakumar M.A wrote:
> On Wednesday, August 5, 2015 at 7:49:24 AM UTC+5:30, wlandsman wrote:
>> You are giving linfit negative errors -- alog10(0.2) = -0.69897
>>
>> If you use the absolute value of alog10(err) you will get consistent results.
>>
>> But probably it is better to do your logarithmic transformation correctly
>>
>> if z = alog10(y) then dz = 0.434*dy/y (I think)
>>
>> where dy is your original err and dz is your transformed err .
>>
>> On Tuesday, August 4, 2015 at 3:54:39 PM UTC-4, Krishnakumar M.A wrote:
>>> Hi,
>>>
>>> I was trying to do a linfit in the following data (I'm using IDL 6.3).
>>>
>>> ---------------------------------------------------
>>>
>>> x = [150.0, 235.0, 325.0, 410.0, 610.0]
>>> y = [200.0, 35.0, 8.4, 3.0, 0.6]
>>> err = [25.0, 5.0, 2.1, 0.8, 0.2]
>>>
>>> result = linfit(alog10(x),alog10(y),MEASURE_ERRORS=alog10(err), CHISQ=chi, COVAR=covmatrix, SIGMA=error, YFIT=fit)
>
>
> Thanks for the reply. I did not get any difference by giving abs(alog10(err)).
>
> But I got better values for chisq and sigma when I used dz = 0.434*dy/y. Could you please tell me why a factor of 0.434?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: cgscatter2d.pro 'keyword parameters not allowed to call' error
Next Topic: IDL crashing on call of TV

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:09:14 PDT 2025

Total time taken to generate the page: 0.15651 seconds