morphoorg/morpho

Automatic residuals plotting

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
Automatically produces a residual plot when using RooFit in fitting mode

Describe the solution you'd like
Using the script here https://root.cern.ch/root/html/tutorials/roofit/rf109_chi2residpull.C.html we could automatically create a plot after the fit that displays the residuals as a function of the variable (or an histogram of the residuals) and use that as diagnostics of the fit.

Describe alternatives you've considered
Could do this manually, but more effort is needed.

Additional context
Exporting this to Stan would be nice too, but there is no easy way yet since likelihood building doesn't always correspond to function fitting