
Plot model convergence status table
Source:R/plot_model_convergence_status.R
plot_model_convergence_status.RdCreates a visual status table showing convergence diagnostics with color-coded pass/warn/fail indicators for each metric. Works with both likelihood-based and loss-based calibration methods by auto-detecting the appropriate diagnostics file.
Arguments
- results_dir
Path to results directory containing convergence diagnostics (expects either "convergence_diagnostics.json" or "convergence_diagnostics_loss.json")
- plots_dir
Path to plots directory (default: "../plots" relative to results_dir)
- status
Optional precomputed result list from
calc_model_convergence_status. When supplied the recomputation and CSV write are skipped.- verbose
Logical indicating whether to print messages
Details
The status-table assembly and the convergence_status.csv write live in
calc_model_convergence_status; this function renders the PDF
table from that result. Pass a precomputed status object to skip
recomputation (and the CSV write).
The function automatically detects whether to use likelihood-based or loss-based diagnostics by checking for the presence of diagnostics files in this order:
convergence_diagnostics.json(likelihood-based, e.g., calibration_test_10.R)convergence_diagnostics_loss.json(loss-based, older methods)
Examples
if (FALSE) { # \dontrun{
# Works with likelihood-based calibration (calibration_test_10.R)
plot_model_convergence_status(
results_dir = "./local/calibration/calibration_test_10/results"
)
# Also works with loss-based calibration (older methods)
plot_model_convergence_status(
results_dir = "./local/calibration/calibration_test_9/results"
)
} # }