which plots the PLL as a function of the parameter.
However, if I try to call migrad on the PLL (modifying from line 77)
RooAbsReal* pll_frac = nll->createProfile(frac) ;
RooMinuit m(*pll);
m.migrad();
RooFit fails to find the minimum and apparently tries to minimize the profile for both the variable of interest and the variable that has been profiled out.
How can I get RooFit to minimize the PLL w.r.t the variable of interest only?
I am not sure exactly what you want to do. If you want to minimise also the variable of interest, why you do not use directly the negative log-likelihood function ?
Say I have a function with 3 variables x,y, n.
n is a noise variable which I want to profile out.
x, y are the parameters of interest.
I want to be able to draw a contour in x,y given that n has been profiled out and is now a function of x and y.
This should not be the same as calling migrad on the initial NLL which depends on x,y,n (and then drawing the contour in x,y) because the script shows that the Profile Likelihood is much broader than the projection of the initial NLL (or correct me if I’m wrong)
The contours obtained by Minuit are obtained profiled all the other parameters, not keeping them constant.
This functionality is already available.
In RooFit you can get it by calling RooMinimizer::contour,