Fit results difference and error bar with nsig=0

:unamused:
I have two questions:

  1. for the bin with zero event, the error bar will be shown with one in default. How to close this with command in program?
  2. I used RooFitResult* r = sum.fitTo(*data,Minos(kFALSE),Save(kTRUE),Extended()); to fit a distribution, the fit is SUCCESSFULLY and the fit gives me a value of FCN. Then I used

RooNLLVar nll(“nll”, “nll”, sum, *data);
RooMinuit m(nll);
m.migrad();
m.hesse();

to fit the same distribution, the fit is also SUCCESSFULLY, but the fit gives me a very different value of FCN. Anyone knows why? Thanks.

Hi, all. I can confirm the second problem.
I have tried the two ways of fitting (i.e. using the fitTo() method and using RooNLLVar and RooMinuit explicitly) on several data sets and PDFs, the results look alike for the estimated parameter values, the fitting status are all OK, but the FCN varies greatly. The FCN value from fitTo() are always smaller though.
Can anybody explain why this is happenning and which way is correct? Is that possiblly because there are some special optimization algorithm apllied in fitTo() method?

Thanks a lot in advance.

Hello,

For the NLL value difference, my guess is that it may be caused by an overall normalization factor (assuming that the fitting results are the same). Usually we don’t care about the absolute value of the NLL, but if you want to use it to measure the goodness of the fitting, please make sure you would not have the problem already discovered, e.g.:
http://www-cdf.fnal.gov/publications/cdf5639_goodnessoffitv2.ps.gz

Jibo

Hi,

If you construct your likelihood like this

RooNLLVar nll(“nll”, “nll”, sum, *data);

you are omitting the extended ML term, which you do included in your fitTo()
command.

To include it do e.g.

RooNLLVar nll(“nll”, “nll”, sum, *data,Extended(kTRUE));

or use the createNLL method of RooAbsPdf to make the likelihood for you

RooAbsReal* = sum.createNll(*data,Extended()) ;

which is recommended because the accepts same options as fitTo() that
control the construction of the likelihood (thus guaranteeing a consistent result).

Wouter