goodnessOfFit

fun ReportBuilder.goodnessOfFit(fit: PDFFitData, caption: String? = null, confidenceLevel: Double = 0.95)(source)

Appends a self-contained section reporting the goodness-of-fit results for a single fitted distribution (PDFFitData).

Produces (inside a section titled caption or the fit's name):

  1. Overview paragraph — distribution name, RV family, parameter count

  2. Bootstrap Parameter Estimates sub-section — one DataTable per parameter, showing original estimate, bootstrap average, bias, standard error, number of bootstrap samples, and three CI variants (normal, basic, percentile)

  3. Distribution Fit Plots sub-section — four individual diagnostic plots: density overlay, Q-Q, ECDF vs theoretical CDF, P-P

  4. Goodness of Fit Tests sub-section — chi-squared bin table (with Expected < 5 warnings) and a summary table of KS, Anderson-Darling, and Cramér-von Mises test statistics and p-values

Note on fit plots: ksl.utilities.io.plotting.FitDistPlot builds a GGBunch (a multi-panel figure) and does not implement ksl.utilities.io.plotting.PlotIfc. Its four component plots (densityPlot, qqPlot, ecdfPlot, ppPlot) each extend ksl.utilities.io.plotting.BasePlot and implement ksl.utilities.io.plotting.PlotIfc directly, so they are rendered individually with their own captions.

Parameters

fit

the PDFFitData to analyse

caption

optional section title; defaults to the fit's name

confidenceLevel

confidence level for bootstrap CIs; must be in (0, 1)


fun ReportBuilder.goodnessOfFit(result: ScoringResult, modeler: PDFModeler, caption: String? = null, confidenceLevel: Double = 0.95)(source)

Backward-compatible overload that renders the goodness-of-fit section for a live ScoringResult, using modeler for the bootstrap parameter estimates. Delegates to the PDFFitData renderer.