Re: Re: error on parameters

From: Patrick Dupre <pd520_at_york.ac.uk>
Date: Fri, 24 Jul 2009 16:32:07 +0100

Hello Lorenzo,

Should I understand what you said, this way: If I run strategy= 0, I cannot expect to get to error on the parameters correct.
If I want the error correct, I need to run at least strategy=1, anf then to run Hesse.
3 points:
1) It take a lot longer to run strategy=1 (it probably depends on the number of parameters, but at least 2, my fit runs already require hours of CPU !).
2) When I run strategy=1, I usually get a does not have a valid convergence.
3) If I do not have a valid convergence with strategy=0, should I try strategy= 1 ?

So, what should I do ?
I can give you a log file, if Minuit can generate one.

This is the result of one fit (strategy=0). Notice that I am not really expecting an improvement of Chi2, because it has already been optimized, but I do expect a relevant value of the error ! Also notice, that the fit diverges at one point ! This one gave me a non valid convergence, but Hesse did not failed. Initial: 1.2931821

1.2931821 chi2: 6.91517995769e-12
1.29321444394 chi2: 6.93284377342e-12
1.29314975646 chi2: 6.92292258619e-12
1.2935055562 chi2: 8.13497408875e-12
1.29285868425 chi2: 8.03480884041e-12
1.29317517583 chi2: 6.91365486087e-12
1.29314747932 chi2: 6.92435203931e-12
1.29314055524 chi2: 6.9306079237e-12
1.29315786547 chi2: 6.91752390616e-12
1.29641015596 chi2: 4.29600498381e-11
1.28994425774 chi2: 4.50516509624e-11
1.29317517583 chi2: 6.91365486087e-12
1.29641015596 chi2: 4.29600498381e-11
1.28994425774 chi2: 4.50516509624e-11
1.32431977762 chi2: 1.2353098824e-10
1.26242804944 chi2: 1.14226698627e-10
1.23631372598 chi2: 1.19214906452e-10
1.35188718705 chi2: 1.22542143152e-10
1.34668977179 chi2: 1.24177177128e-10
1.24106095202 chi2: 1.13462462594e-10
1.26623398714 chi2: 1.14191276127e-10
1.32593412373 chi2: 1.24702602996e-10

End !!!

thank For your help !

>
> On Jul 20, 2009, at 9:17 PM, Patrick Dupre wrote:
>
>> Hello,
>>
>> This is typically the sort of results that I get:
>> #A => 1.17818198 ( 1.1)
>> #B => 0.327126963 ( 0.31)
>> #C => 0.283866159 ( 0.21)
>> or
>> #T0 => 7373.27411 ( 43)
>> #A => 1.17818028 ( 0.17)
>> #B => 0.327132837 ( 0.048)
>> #C => 0.283861776 ( 0.032)
>>
>> Both set of fitted parameters are acceptable, so the error should be
>> ~ 1e-3 for T0
>> ~ 1e-4 for A
>> ~5e-5 for B and C
>>
>> I used strategy = 0. I did not notice any complain about the
>> convergence, although strategy=1 would have probably give
>> me a wrong convergence.
>
> this is suspicious and already indicates a potential problem in your fit.
> Strategy=1 is normally the default use when fitting and also Hesse should be
> run after fitting to get the
> correct covariance matrix and to verify the convergence. If you don't get a
> right convergence then the obtained errors do not make really sense.
>>
>> The uncertainties on my data are of the order of 2e-9, so I should
>> multiply the error by 2e-9 ! I have ~ 16000 data.
>> In addition, I do not really understand why I get an order of magnitude
>> better result with one fit compared to the other one.
>
> This could be explained by the fact that the fit did not converge well.
>>
>> For those set of paramters, the only way to approach something with
>> some sense would be to multiply the obtained uncertainties
>> by my data uncertainty and to multiply by the number of data !!!
>>
>> Can I get some clarifications ?
>
> You can also check the chi2 resulting after fitting. Eventually if the errors
> on the data are under-estimated you could get a too small errors on the
> parameters. In that case you could re-scale the parameters errors using the
> chi2 value.
>
> Best Regards
>
> Lorenzo
>>
>> Thank.
>>
>>
>> Hello,
>>
>> min.UserState ().Error (i)
>>
>> returns the error on the fit parameter but after fitting. Before fitting
>> (and for fixed parameters) or when the fit failed I will be equal to the
>> value set before fitting
>>
>> Lorenzo
>>
>> On Jul 9, 2009, at 9:27 PM, Patrick Dupre wrote:
>>
>>> Hello,
>>>
>>> Using FunctionMinimum
>>>
>>> To get the fitted parameters, I use:
>>> para [i] = min.UserState ().Value (i) ;
>>> and to get the error on the parameter:
>>> d_para [i] = min.UserState ().Error (i) ;
>>> but this value is always equal the the uncertainty to the paramter
>>> that I set before the fit.
>>>
>>> Did I not understand the documentation ?
>>>
>>> ThankA
>>
>>
>>
>> --
>> ---
>> ==========================================================================
>> Patrick DUPRÉ | |
>> Department of Chemistry | | Phone: (44)-(0)-1904-434384
>> The University of York | | Fax: (44)-(0)-1904-432516
>> Heslington | |
>> York YO10 5DD United Kingdom | | email: pd520_at_york.ac.uk
>> ==========================================================================
>

-- 
---
==========================================================================
  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email: pd520_at_york.ac.uk
==========================================================================
Received on Fri Jul 24 2009 - 17:32:22 CEST

This archive was generated by hypermail 2.2.0 : Fri Jul 24 2009 - 23:50:02 CEST