Re: Fitting TGraphErrors

From: OKUMURA, Akira <oxon_at_ceres.phys.s.u-tokyo.ac.jp>
Date: Mon, 29 Jun 2009 00:30:31 +0900


Hello Lorenzo,

I got a similar problem again when I fit a TGraphErrors with a function "x**[0]". Would you check the attached macro, please? Most of the code is the same as the previous one I sent in February.

Chi^2 often becomes "inf", but not always. Please run the macro repeatedly if you get a proper result.

I am using the SVN HEAD on Leopard.

Regards,

OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp Department of Physics, The University of Tokyo 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
TEL/FAX +81 3-5841-4173/4059
Skype : okumura.akira

On 2009/02/25, at 1:36, Lorenzo Moneta wrote:

> Hi,
>
> using option "F" in your particular case showed a problem. Thank you
> for your example.
> This is now fixed in the trunk version and your macro works fine.
> What stated in the doc is correct, with the linear fitter error in
> X are not taken into account when fitting a TGraphErrors
>
> Best Regards
>
> Lorenzo
> On Feb 24, 2009, at 1:25 PM, OKUMURA, Akira wrote:
>
>> Hello Rene,
>>
>> Did you mention this?
>> =======
>> Note, that the linear fitter doesn't take into account the errors
>> in x. If errors in x are important, go through minuit (use option
>> "F" for polynomial fitting).
>> =======
>>
>> I tried "F" option, but the result becomes chi^2/ndf = 0/0
>>
>> Regards,
>>
>> OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp
>> Department of Physics, The University of Tokyo
>> 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
>> TEL/FAX +81 3-5841-4173/4059
>> Skype : okumura.akira
>>
>> On 2009/02/24, at 21:03, Rene Brun wrote:
>>
>>> see comments in the doc of TGraph::Fit
>>> http://root.cern.ch/root/html/TGraph.html#TGraph:Fit
>>>
>>> Rene Brun
>>>
>>> OKUMURA, Akira wrote:
>>>> Hello ROOTers,
>>>>
>>>> I attache an example of TGraphErrors::Fit. The left plot returns
>>>> reasonable chi^2/ndf, but the right side doesn't. The result
>>>> depends on the variable "kScale" in the macro.
>>>>
>>>> The fitting results from the left and the right plots should be
>>>> the same value mathematically.
>>>>
>>>> Am I doing something incorrect?
>>>>
>>>> 5.22.00 + Mac OS X 10.5.6
>>>>
>>>> Regards,
>>>>
>>>> OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp
>>>> Department of Physics, The University of Tokyo
>>>> 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
>>>> TEL/FAX +81 3-5841-4173/4059
>>>> Skype : okumura.akira
>>>
>>
>

Received on Sun Jun 28 2009 - 17:30:40 CEST

This archive was generated by hypermail 2.2.0 : Sun Jun 28 2009 - 23:50:01 CEST