How to make fit with log-likelihood method using TGraphErrors

Dear all,

I want to fit my function to my data using log-likelihood method but my data is TGraphError and I have a complicated function to fit into my data. I have searched but couldn’t find any related material on the matter.

Thanks a lot in advance for your help,
Cheers.


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.24.00
Platform: Mac OS
Compiler: gnu


It seems to me that you need to write your own “likelihood function”, and then you can use the "U" graph fit option, or maybe better:

Hi,
The standard fit of a TGraphErrors (with error only in the y coordinate) assume a normal distribution for your data point. Your default ROOT fit is a log-likelihood fit, which is equivalent to a chi-square fit. If your data points have a different distribution, you might need additional information for this distribution and then use the option Wile suggested above.
If instead the distribution is Poisson, there is no need for you to use a TGraph, but you should convert your data in an histogram and then fitting from the histogram using the ‘L’ option

Lorenzo

I guess any histogram fit will perform a “binned fit”, while with a graph, it could be an “unbinned fit” (so converting data to a histogram will introduce some “bias”).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.