mcExperimentDiagnostics

Appends a single Convergence Diagnostics section for exp.

This is a standalone building block. It shows whether the half-width criterion was met, the achieved vs desired half-width, the error gap, the estimated sample size needed, and total observations executed. When MCExperiment.saveConvergenceHistory was true before the run, a ScatterPlot of half-width vs macro-replication number is appended with a horizontal reference line at MCExperiment.desiredHWErrorBound.

When the experiment has not yet been run, a single paragraph is emitted instead.

Produces (inside a section titled caption or "Convergence Diagnostics"):

  • DataTable (headers: Diagnostic | Value): convergence met, desired HW bound, achieved HW, error gap, estimated sample size needed, macro replications run, micro reps per macro, total observations

  • Optional ScatterPlot of half-width history (when history was recorded)

Parameters

exp

the MCExperiment whose diagnostics to report

caption

optional section title; defaults to "Convergence Diagnostics"