Thank you. From the documentation I read “RooProfileLL is the input likelihood nll minimized w.r.t all nuisance parameters (which are all parameters except for those listed in the constructor) minus the -log(L) of the best fit”.
I guess that ProfileLL means “profiled log likelihood”, so I don’t understand why it returns something different from its name. By the way it seems that it could be solved using the function
void setAlwaysStartFromMin(Bool_t flag)
I tried to call it just after the creation of the profiled likelihood ratio as:
Hi,
The flag refers to the starting point of the likelihood minimisation to compute the profile likelihood value.
I do not understand your problem. If you don’t want to have the PLR to be zero at the minimum, just add the minimum likelihood value. Do something like ( I assume you did not minimise the likelihood before):
auto nllp = nll.createProfile(profile_set);
double profileLogLikelihoodRatio_value = nllp.getVal();
auto vars = nll.getVariables();
*vars = nllp.bestFitObs();
*vars = nllp.bestFitParams;
double minNLL = nll.getVal();
double profileLogLikelihood_value = profileLogLikelihoodRatio_value + minNLL;