Hello Rooters,
I am trying to fit my data (combinedFit.C) and estimate the parameters using negative log-likelihood. The code runs but without finding the minimum values.
Before this I used the Chi-square and it worked fine.
Can you guys help me out with performing the negative log-likelihood ?
I attach a simple code which reads the text file and performs either chi-square [commented] or negative log likelihood (PoissonLLFunction).
Hi,
You are right, Thank you. It works with Minuit.
The only problem that I have now is that the error bars are very high on each parameter. Do you know how to can reduce the error bars? I can try changing parameters to different values.
Errors of parameters are okey for the chi^2 fit, but are too big for
the likelihood fit. Maybe the ROOT experts know the reason.
In any case Iād recommend to redefine your fit functions like this
TF1 *fexp1 = new TF1("fexp1", "[2]/86400.*exp(-x/[0])+[1]", 23,123);
TF1 *fexp2 = new TF1("fexp2", "[2]/86400.*exp(-x/[0])+[1]", 23,123);