Skip to contents

`plot_calibration_curve()` renders an empirical-coverage-vs-N curve from an [ms_calibration_grid()] table (U-M3b-05): one facet per true share, the acceptance window as a shaded band, per-cell binomial standard errors as error bars, and cells outside the window as red cross markers. The plot is the visual twin of [ms_calibration_verdict()] – it never re-judges, it only marks the kernel-side `pass_window` column.

Usage

plot_calibration_curve(calibration_df, window = NULL, se = TRUE)

Arguments

calibration_df

A data.frame as returned by [ms_calibration_grid()] (columns `n`, `share`, `mean_coverage`, `se`, `pass_window`).

window

Numeric `c(lo, hi)`: the shaded acceptance band. Defaults to the table's recorded `window` attribute, falling back to the frozen `c(0.930, 0.970)`.

se

Single logical (default `TRUE`): draw the binomial standard errors (requires the `se` column).

Value

A ggplot object. All violations raise `msuiter_error_*` conditions (including the missing-ggplot2 case: ggplot2 is a Suggests dependency and is required only at call time).

See also

[ms_calibration_grid()] for the measurement, [ms_calibration_verdict()] for the automated gate.