Dear Roofitters,
I am performing a fit to a weighted dataset (the weight distribution is quite broad and it has <1% negative weights) and then trying to get a correct estimation of the parameters uncertainties. For that i used the AsymptoticError(true) option of fitTo. The fit converges without issues, but when it tries to calculate the corrected covariance matrix I get evaluation errors telling me the pdf is less than 0:
[#1] INFO:Fitting – RooAbsPdf::fitTo(cmodel_INC) Calculating covariance matrix according to the asymptotically correct approach. If you find this method useful please consider citing [1911.01303] Parameter uncertainties in weighted unbinned maximum likelihood fits.
[#0] ERROR:Eval – RooAbsReal::logEvalError(model_INC) evaluation error,
origin : RooAddPdf::model_INC[ norm_h_Phi_SR_Mix_KDE_INC * pdf_h_Phi_SR_Mix_KDE_INC + norm_h_Phi_SR_Signal_H_INC * pdf_h_Phi_SR_Signal_H_INC ]
message : p.d.f value is less than zero (-0.016755), forcing value to zero
server values: !refCoefNorm=(), !refCoefNorm=(), !pdfs=(pdf_h_Phi_SR_Mix_KDE_INC = 0.00822085/1,pdf_h_Phi_SR_Signal_H_INC = 0.191187/1), !coefficients=(norm_h_Phi_SR_Mix_KDE_INC = 2760.21,norm_h_Phi_SR_Signal_H_INC = -331.522)
[#0] ERROR:Eval – RooAbsReal::logEvalError(model_INC) evaluation error,
origin : RooAddPdf::model_INC[ norm_h_Phi_SR_Mix_KDE_INC * pdf_h_Phi_SR_Mix_KDE_INC + norm_h_Phi_SR_Signal_H_INC * pdf_h_Phi_SR_Signal_H_INC ]
message : p.d.f value is less than zero (-0.006503), forcing value to zero
server values: !refCoefNorm=(), !refCoefNorm=(), !pdfs=(pdf_h_Phi_SR_Mix_KDE_INC = 0.00802282/1,pdf_h_Phi_SR_Signal_H_INC = 0.114438/1), !coefficients=(norm_h_Phi_SR_Mix_KDE_INC = 2760.21,norm_h_Phi_SR_Signal_H_INC = -331.522)
[#0] ERROR:Eval – RooAbsReal::logEvalError(model_INC) evaluation error,
origin : RooAddPdf::model_INC[ norm_h_Phi_SR_Mix_KDE_INC * pdf_h_Phi_SR_Mix_KDE_INC + norm_h_Phi_SR_Signal_H_INC * pdf_h_Phi_SR_Signal_H_INC ]
message : p.d.f value is less than zero (-0.002421), forcing value to zero
server values: !refCoefNorm=(), !refCoefNorm=(), !pdfs=(pdf_h_Phi_SR_Mix_KDE_INC = 0.00798658/1,pdf_h_Phi_SR_Signal_H_INC = 0.0842332/1), !coefficients=(norm_h_Phi_SR_Mix_KDE_INC = 2760.21,norm_h_Phi_SR_Signal_H_INC = -331.522)
(etc)
I am using a S+B model and in this case the fit result makes S negative, so the pdf can be -ve, but not really in the range I’ve restricted it to.
I find the errors strange given that if indeed i had negative values of the pdf wouldn’t the fit have issues as well? I’ve evaluated the pdf for different values of my observable has a check (after fitting) and only got positive values. Has anyone seen this problem before with the AsymptoticError option?
Thank you in advance.
Cheers,
Júlia