Province in-sample checks
This page checks whether the joint model reproduces the per-province data it was fitted to, follows each province's published estimates across releases, and refits it as a single population to check the spatial structure. The national checks are on the national in-sample checks page.
Load packages, data and fitted chains
# Shared setup: packages, observations and the fit registry. See
# `docs/pages/_setup.jl`.
using BVDOutbreakSize
include(joinpath(pkgdir(BVDOutbreakSize), "docs", "pages", "_setup.jl"))validation_forecast_from (generic function with 1 method)# The fits this page reads, loaded from the cache here.
chn_joint = load_fit("joint")
# `sens_no_patches` is the headline with `n_patches = 1`, the check on the
# spatial structure.
chn_no_patches = load_fit("sens_no_patches")
posterior_C_joint = vec(Array(chn_joint[:C_T]))
posterior_C_no_patches = vec(Array(chn_no_patches[:C_T]));Summary
Whether each province's cases and deaths are reproduced, from the checks below. Bias and coverage are defined as on the national in-sample checks page, with coverage of the 90% predictive interval. The split columns score each province's share at the observed national total, and the count columns score its counts once the national total is predicted as well. A check that was not scored reads n/a.
Least well reproduced: Analysed specimens, Nord-Kivu; Analysed specimens, Haut-Uele and Analysed specimens, Ituri have the largest absolute bias in the province split.
Coverage: 24 of 24 province streams have 90% coverage of at least 0.8; the lowest is Confirmed deaths, Nord-Kivu at 0.92.
Count-scale coverage: 16 of 16 province streams have 90% coverage of at least 0.8; the lowest is Confirmed deaths, Ituri at 0.92.
| Province | Stream | Bias (split) | 90% coverage (split) | Bias (counts) | 90% coverage (counts) |
|---|---|---|---|---|---|
| Ituri | Confirmed cases | -0.01 | 0.95 | 0.05 | 0.95 |
| Ituri | Confirmed deaths | 0.01 | 0.94 | -0.03 | 0.92 |
| Nord-Kivu | Confirmed cases | 0.01 | 0.93 | 0.04 | 0.96 |
| Nord-Kivu | Confirmed deaths | -0.03 | 0.92 | -0.06 | 0.94 |
| Haut-Uele | Confirmed cases | 0.05 | 0.93 | 0.06 | 0.96 |
| Haut-Uele | Confirmed deaths | 0.01 | 0.97 | -0.01 | 0.98 |
| Sud-Kivu | Confirmed cases | 0.01 | 0.99 | 0.01 | 0.99 |
| Sud-Kivu | Confirmed deaths | 0 | 0.99 | 0 | 1 |
| Tshopo | Confirmed cases | 0.04 | 0.95 | 0.04 | 0.97 |
| Tshopo | Confirmed deaths | 0.01 | 0.98 | 0.01 | 0.98 |
| Bas-Uele | Confirmed cases | 0 | 0.98 | 0 | 0.98 |
| Bas-Uele | Confirmed deaths | 0.01 | 0.97 | 0.01 | 0.97 |
| Sud-Ubangi | Confirmed cases | 0 | 0.98 | 0 | 0.98 |
| Sud-Ubangi | Confirmed deaths | 0 | 0.99 | 0 | 0.99 |
| Nord-Ubangi | Confirmed cases | 0.01 | 0.98 | 0.01 | 0.98 |
| Nord-Ubangi | Confirmed deaths | 0.01 | 0.99 | 0.01 | 0.99 |
Province prior predictive check
Whether the province model's prior, before any data are fitted, brackets each province's observed share of the confirmed cases and deaths.
Draw from the province model's prior
prior_patch_chn = patch_prior_draws(obs);
prior_province_table = patch_overview_table(prior_patch_chn, N_PATCHES);Show prior province summary table
| Province | Reproduction number | Cumulative infections | Share of infections (%) | Relative ascertainment |
|---|---|---|---|---|
| Ituri | 0.77 (0.07–1.67) | 1110252 (1504–3940792) | 74.4 (14.2–99.1) | 1.01 (0.59–1.74) |
| Nord-Kivu | 1.16 (0.08–2.21) | 69277 (13–7401325) | 7.5 (0.2–34.2) | 1.01 (0.63–1.76) |
| Haut-Uele | 1.12 (0.07–2.18) | 21031 (4–2001289) | 2.9 (0.1–12.7) | 1.0 (0.57–1.63) |
| Sud-Kivu | 1.19 (0.09–2.3) | 35901 (6–6392968) | 4.3 (0.1–26.0) | 0.99 (0.55–1.69) |
| Tshopo | 1.19 (0.09–2.27) | 11549 (2–2515810) | 1.5 (0.0–11.1) | 1.0 (0.6–1.67) |
| Bas-Uele | 1.21 (0.09–2.27) | 5413 (1–1219884) | 0.7 (0.0–5.3) | 1.01 (0.6–1.69) |
| Sud-Ubangi | 1.23 (0.09–2.44) | 6986 (1–2686280) | 0.8 (0.0–10.1) | 1.01 (0.59–1.65) |
| Nord-Ubangi | 1.22 (0.09–2.35) | 3543 (1–1389117) | 0.5 (0.0–5.5) | 1.0 (0.56–1.65) |
Province composition prior predictive checks
prior_case_ppc_fig = plot_province_composition_ppc(
prior_patch_chn;
share_key = :province_shares,
obs_increments = province_cases.increments,
days = province_cases.days, seeding = obs.seeding, n_patches = N_PATCHES,
title = "Confirmed case share by province, prior"
);
prior_death_ppc_fig = plot_province_composition_ppc(
prior_patch_chn;
share_key = :province_death_shares,
obs_increments = province_deaths.increments,
days = province_deaths.days, seeding = obs.seeding, n_patches = N_PATCHES,
title = "Confirmed death share by province, prior"
);

Spatial hyperparameters against their prior
Whether the data move the province model's spatial hyperparameters away from their prior.
Spatial hyperparameter pair plot
spatial_pair_fig = plot_pair(
chn_joint, spatial_params;
prior = prior_patch_chn, labels = spatial_labels
);
Province compositions
Whether each province's modelled share of the national confirmed cases and deaths reproduces the observed share at every spatial vintage (see the province compositions Methods section).
Province composition posterior predictive checks
province_case_ppc_fig = plot_province_composition_ppc(
chn_joint;
share_key = :province_shares,
obs_increments = province_cases.increments,
days = province_cases.days, seeding = obs.seeding, n_patches = N_PATCHES,
title = "Confirmed case share by province"
);
province_death_ppc_fig = plot_province_composition_ppc(
chn_joint;
share_key = :province_death_shares,
obs_increments = province_deaths.increments,
days = province_deaths.days, seeding = obs.seeding, n_patches = N_PATCHES,
title = "Confirmed death share by province"
);

The four province terms for the isolation and laboratory data are checked the same way. A gap in a panel is a day on which that province printed nothing.
Province laboratory, occupancy, bed and admission split posterior predictive checks
province_lab_bin_days = [
maximum(province_lab.days[province_lab.bins .== b])
for b in 1:maximum(province_lab.bins)
];
province_lab_ppc_fig = plot_province_composition_ppc(
chn_joint;
share_key = :province_lab_shares,
obs_increments = province_lab.increments,
days = province_lab_bin_days, seeding = obs.seeding, n_patches = N_PATCHES,
title = "Analysed specimen share by province, by week"
);
province_occupancy_ppc_fig = plot_province_split_ppc(
chn_joint;
share_key = :province_occupancy_share, rows = province_isolation,
seeding = obs.seeding, n_patches = N_PATCHES,
title = "Isolation occupancy share by province"
);
province_beds_ppc_fig = plot_province_split_ppc(
chn_joint;
share_key = :province_capacity_share, rows = province_capacity,
seeding = obs.seeding, n_patches = N_PATCHES,
title = "Isolation bed share by province"
);
province_admissions_ppc_fig = plot_province_split_ppc(
chn_joint;
share_key = :province_admissions_share, rows = province_admissions,
seeding = obs.seeding, n_patches = N_PATCHES,
title = "Admission share by province"
);



Province stream calibration
Whether each province's share predictions are calibrated at the observed national total, scored as in the national stream calibration. The analysed-specimen rows score the weekly laboratory split the same way, at each week's observed national analysed total.
Build the province calibration panels
province_case_panels = province_composition_panels(
chn_joint;
share_key = :province_shares,
obs_increments = province_cases.increments,
stream = "Confirmed cases", n_patches = N_PATCHES
);
province_death_panels = province_composition_panels(
chn_joint;
share_key = :province_death_shares,
obs_increments = province_deaths.increments,
stream = "Confirmed deaths", n_patches = N_PATCHES
);
province_lab_panels = province_composition_panels(
chn_joint;
share_key = :province_lab_shares,
obs_increments = province_lab.increments,
stream = "Analysed specimens", n_patches = N_PATCHES
);
province_panels = vcat(
province_case_panels, province_death_panels, province_lab_panels
);
province_calibration_table = stream_calibration(province_panels);
province_calibration_fig = plot_stream_calibration(
province_calibration_table
);
Province calibration table
| Stream | Vintages | Bias | 50% coverage | 90% coverage |
|---|---|---|---|---|
| Confirmed cases, Ituri | 133 | -0.01 | 0.61 | 0.95 |
| Confirmed cases, Nord-Kivu | 133 | 0.01 | 0.56 | 0.93 |
| Confirmed cases, Haut-Uele | 133 | 0.05 | 0.73 | 0.93 |
| Confirmed cases, Sud-Kivu | 133 | 0.01 | 0.99 | 0.99 |
| Confirmed cases, Tshopo | 133 | 0.04 | 0.83 | 0.95 |
| Confirmed cases, Bas-Uele | 133 | 0 | 0.92 | 0.98 |
| Confirmed cases, Sud-Ubangi | 133 | 0 | 0.98 | 0.98 |
| Confirmed cases, Nord-Ubangi | 133 | 0.01 | 0.98 | 0.98 |
| Confirmed deaths, Ituri | 132 | 0.01 | 0.64 | 0.94 |
| Confirmed deaths, Nord-Kivu | 132 | -0.03 | 0.62 | 0.92 |
| Confirmed deaths, Haut-Uele | 132 | 0.01 | 0.79 | 0.97 |
| Confirmed deaths, Sud-Kivu | 132 | 0 | 0.99 | 0.99 |
| Confirmed deaths, Tshopo | 132 | 0.01 | 0.89 | 0.98 |
| Confirmed deaths, Bas-Uele | 132 | 0.01 | 0.97 | 0.97 |
| Confirmed deaths, Sud-Ubangi | 132 | 0 | 0.99 | 0.99 |
| Confirmed deaths, Nord-Ubangi | 132 | 0.01 | 0.99 | 0.99 |
| Analysed specimens, Ituri | 21 | 0.08 | 0.95 | 1 |
| Analysed specimens, Nord-Kivu | 21 | -0.17 | 0.9 | 1 |
| Analysed specimens, Haut-Uele | 21 | -0.16 | 0.48 | 1 |
| Analysed specimens, Sud-Kivu | 21 | 0.06 | 0.71 | 1 |
| Analysed specimens, Tshopo | 21 | 0.02 | 0.9 | 1 |
| Analysed specimens, Bas-Uele | 21 | 0.05 | 0.71 | 1 |
| Analysed specimens, Sud-Ubangi | 21 | 0.08 | 0.95 | 1 |
| Analysed specimens, Nord-Ubangi | 21 | 0.06 | 0.95 | 1 |
Province counts
Whether each province's cases and deaths are reproduced as counts once the national total is predicted as well.
Build the province count panels
# Each province's confirmed cases and deaths split from the national
# posterior predictive by the fitted shares, shared with the dashboard's
# province series (see `joint_count_replicates` in `docs/pages/_setup.jl`).
province_count_replicates = joint_count_replicates();
province_case_count_panels = province_count_replicates.cases.panels;
province_death_count_panels = province_count_replicates.deaths.panels;
province_count_calibration_table = stream_calibration(
vcat(province_case_count_panels, province_death_count_panels)
);
province_count_calibration_fig = plot_stream_calibration(
province_count_calibration_table
);Province count calibration plot

Province count calibration table
| Stream | Vintages | Bias | 50% coverage | 90% coverage |
|---|---|---|---|---|
| Confirmed cases, Ituri | 133 | 0.05 | 0.71 | 0.95 |
| Confirmed cases, Nord-Kivu | 133 | 0.04 | 0.69 | 0.96 |
| Confirmed cases, Haut-Uele | 133 | 0.06 | 0.71 | 0.96 |
| Confirmed cases, Sud-Kivu | 133 | 0.01 | 0.99 | 0.99 |
| Confirmed cases, Tshopo | 133 | 0.04 | 0.85 | 0.97 |
| Confirmed cases, Bas-Uele | 133 | 0 | 0.92 | 0.98 |
| Confirmed cases, Sud-Ubangi | 133 | 0 | 0.98 | 0.98 |
| Confirmed cases, Nord-Ubangi | 133 | 0.01 | 0.98 | 0.98 |
| Confirmed deaths, Ituri | 132 | -0.03 | 0.63 | 0.92 |
| Confirmed deaths, Nord-Kivu | 132 | -0.06 | 0.6 | 0.94 |
| Confirmed deaths, Haut-Uele | 132 | -0.01 | 0.74 | 0.98 |
| Confirmed deaths, Sud-Kivu | 132 | 0 | 0.99 | 1 |
| Confirmed deaths, Tshopo | 132 | 0.01 | 0.89 | 0.98 |
| Confirmed deaths, Bas-Uele | 132 | 0.01 | 0.97 | 0.97 |
| Confirmed deaths, Sud-Ubangi | 132 | 0 | 0.99 | 0.99 |
| Confirmed deaths, Nord-Ubangi | 132 | 0.01 | 0.99 | 0.99 |
Province correlations and totals
Which province quantities trade off against each other, and whether each province's case and death totals agree with the observed ones.
Province posterior correlation heatmap
# Per-province entries of a vector deterministic, one draw vector each,
# keyed `<name>_<patch>` so they can sit side by side in one table.
function _patch_columns(chn, key::Symbol, name::AbstractString; f = identity)
draws = [collect(v) for v in vec(collect(chn[key]))]
return [
Symbol(name, "_", p) => Float64[f(d[p]) for d in draws]
for p in 1:N_PATCHES
]
end
# LaTeX label for one province's entry of a quantity. Spaces in a province
# name need escaping inside `\mathrm`.
_province_tex(sym, p) = string(
sym, raw"\ (\mathrm{", replace(PROVINCE_LABELS[p], " " => raw"\ "), "})"
)
province_correlation_draws = NamedTuple(
vcat(
[:C_T => vec(Array(chn_joint[:C_T]))],
_patch_columns(chn_joint, :R_T_patch, "R_T"),
_patch_columns(chn_joint, :province_ascertainment, "asc"),
_patch_columns(chn_joint, :CFR_patch, "CFR")
)
);
province_correlation_labels = merge(
Dict(:C_T => raw"C_T"),
Dict(
Symbol(name, "_", p) => _province_tex(tex, p)
for p in 1:N_PATCHES
for (name, tex) in (
("R_T", raw"R_T"), ("asc", raw"p_\mathrm{asc}"),
("CFR", raw"\mathrm{CFR}"),
)
)
);
province_correlation_fig = plot_correlation_heatmap(
province_correlation_draws; labels = province_correlation_labels
);
Province totals against observed
# Keyed by panel title, which names the stream and the province. A total
# that is the same in every draw (a patch with no deaths at any vintage) has
# no spread to plot and gives the corner plot a zero-width axis, so it is
# left out.
_varying_panels = filter(
p -> length(unique(sum(r) for r in p.replicates)) > 1, province_panels
);
province_totals = NamedTuple(
Symbol(p.title) => [sum(Float64.(r)) for r in p.replicates]
for p in _varying_panels
);
province_observed = NamedTuple(
Symbol(p.title) => Float64(sum(p.observed)) for p in _varying_panels
);
province_pairs_fig = plot_stream_pairs(province_totals, province_observed);
Estimate evolution across releases
How each province's estimates have moved as releases accrued, read from the estimates each release published at its own cut-off. Each panel starts at the first release that published per-province estimates.
Load the per-province estimates of each release
# Written by `scripts/score_releases.jl` from each release's
# `province_estimates.csv`, one row per release, province and quantity. A
# missing file reads as an empty table, which the figures report as nothing
# collected.
province_release_df = _release_data(
joinpath("province", "released_estimates.csv"),
(;
release = String, date = Date, area = String, patch = String,
pooled = Int, quantity = String, median = Float64, lo90 = Float64,
hi90 = Float64,
)
)
# One panel per province, the patches first in their usual order. A
# province pooled into a shared patch is marked, since it carries its
# patch's reproduction number and case-fatality ratio.
_release_provinces = unique(vcat(PROVINCE_NAMES, province_release_df.area))
_release_pooled = Set(
r.area for r in eachrow(province_release_df)
if coalesce(r.pooled, 0) == 1
)
_release_titles = Dict(
a => string(
get(Dict(zip(PROVINCE_NAMES, PROVINCE_LABELS)), a, a),
a in _release_pooled ? " (pooled)" : ""
) for a in _release_provinces
)
_province_release_groups(q) = area_evolution_groups(
province_release_df, q;
areas = _release_provinces, labels = _release_titles
)
_no_release_note = "No releases scored yet. This fills in as releases accumulate."
province_rt_release_fig = plot_evolution_by_group(
_province_release_groups("R_T");
ylabel = "Reproduction number",
title = "Province reproduction number by release",
released_label = "Released estimate", marks_label = "median, 90% bar",
refline = 1.0, ymax = 3.0, ncols = 4,
empty_note = _no_release_note
);
province_cases_release_fig = plot_evolution_by_group(
_province_release_groups("cases");
ylabel = "Confirmed cases",
title = "Province confirmed cases by release",
released_label = "Reported by the release cut-off", marks_label = "",
shared_yrange = false, ncols = 4, empty_note = _no_release_note
);
province_cfr_release_fig = plot_evolution_by_group(
_province_release_groups("CFR");
ylabel = "Case-fatality ratio",
title = "Province case-fatality ratio by release",
released_label = "Released estimate", marks_label = "median, 90% bar",
ymax = 1.0, ncols = 4,
empty_note = _no_release_note
);Reproduction number by release

Confirmed cases by release

Case-fatality ratio by release

Province sensitivity to assumptions
Spatial structure sensitivity
We refit the joint model with its eight patches reduced to one well-mixed population. Splitting the country into provinces adds no national data, so the national outbreak size should not move far either way. The two still differ, because the country grows at the force-weighted mean of the provinces' reproduction numbers, which sits above the central trend they pool toward. That gap is first order in the deviation scale, so a large gap between the two posteriors would point at the deviation priors.
spatial_sensitivity_table = streams_table(
"Meta-population (headline)" => posterior_C_joint,
"Single population (n_patches = 1)" => posterior_C_no_patches
);
spatial_sensitivity_table| Row | Stream | Lower 90% | Lower 60% | Lower 30% | Upper 30% | Upper 60% | Upper 90% |
|---|---|---|---|---|---|---|---|
| String | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
| 1 | Meta-population (headline) | 15569.0 | 18036.0 | 20118.0 | 24013.0 | 26620.0 | 32374.0 |
| 2 | Single population (n_patches = 1) | 15598.0 | 18658.0 | 20715.0 | 25069.0 | 27865.0 | 33332.0 |
Spatial-structure density overlay
spatial_sensitivity_fig = plot_density_overlay(
"Meta-population (headline)" => posterior_C_joint,
"Single population" => posterior_C_no_patches;
xlabel = "Cumulative infections"
);
The spatial structure could also move other national quantities that both fits estimate, so their posteriors should sit on top of each other.
National quantities under both structures
spatial_rt_fig = plot_rt_streams(
[
(;
label = "Single population (n_patches = 1)",
chn = chn_no_patches, rt_start = _rt_start_plot,
rt_walk_start = clamp(
_BREAKPOINT - RT_WALK_LEAD, _rt_start_plot,
obs.n
), colour = :steelblue,
),
];
joint = (;
chn = chn_joint, rt_start = _rt_start_plot,
rt_walk_start = clamp(
_BREAKPOINT - RT_WALK_LEAD, _rt_start_plot,
obs.n
),
),
n = obs.n, breakpoint = _BREAKPOINT,
as_of_date = string(obs.cutoff), seeding = obs.seeding,
display_start = _rt_start_plot, ncols = 1,
title = "National reproduction number under both structures",
reference_label = "the meta-population headline",
panel_label = "the single-population fit"
);
spatial_cfr_fig = plot_density_overlay(
"Meta-population (headline)" => vec(Array(chn_joint[:CFR])),
"Single population" => vec(Array(chn_no_patches[:CFR]));
xlabel = "Case-fatality ratio"
);
spatial_rt_density_fig = plot_density_overlay(
"Meta-population (headline)" => vec(Array(chn_joint[:R_T])),
"Single population" => vec(Array(chn_no_patches[:R_T]));
xlabel = "Reproduction number at the cut-off"
);


National quantities under both structures, as a table
# One row per national quantity, one column per structure, each cell a
# median with a 90% credible interval. Built here rather than by stacking
# two `summary_table` calls, so the two structures sit side by side and the
# reader compares along a row.
spatial_quantities_table = let
# A count rounded to zero decimals still prints a trailing ".0", so
# whole-number quantities go through `Int`.
fmt(x, d) = d <= 0 ? string(round(Int, x)) : string(round(x; digits = d))
cell(v, d) = string(
fmt(quantile(v, 0.5), d), " (",
fmt(quantile(v, 0.05), d), "–", fmt(quantile(v, 0.95), d), ")"
)
rows = [
("Cumulative infections", :C_T, 0),
("Reproduction number at the cut-off", :R_T, 2),
("Case-fatality ratio", :CFR, 2),
("Outbreak age (days)", :T, 0),
("Latest growth rate (per day)", :r, 3),
]
DataFrame(
"Quantity" => [r[1] for r in rows],
"Meta-population (headline)" => [
cell(
vec(Array(chn_joint[r[2]])), r[3]
)
for r in rows
],
"Single population" => [
cell(vec(Array(chn_no_patches[r[2]])), r[3])
for r in rows
]
)
end;| Row | Quantity | Meta-population (headline) | Single population |
|---|---|---|---|
| String | String | String | |
| 1 | Cumulative infections | 22083 (15569–32374) | 22612 (15598–33332) |
| 2 | Reproduction number at the cut-off | 1.03 (0.76–1.4) | 0.97 (0.69–1.26) |
| 3 | Case-fatality ratio | 0.52 (0.4–0.63) | 0.52 (0.4–0.64) |
| 4 | Outbreak age (days) | 228 (219–244) | 230 (220–245) |
| 5 | Latest growth rate (per day) | 0.002 (-0.019–0.025) | -0.002 (-0.024–0.016) |
Province parameter recovery
Whether the model recovers each province's values when fitted to data it simulated itself, from the same runs as the national parameter recovery.
Recovery figure
province_recovery_results = recovery_results()
_recovery_short = [
"C_T_patch" => "C_T", "R_T_patch" => "R_T", "CFR_patch" => "CFR",
"province_ascertainment" => "ascertainment",
"region_drift_sd" => "drift SD",
]
province_recovery_quantities = [
"$(k)[$(p)]" for (k, _) in _recovery_short for p in PROVINCE_LABELS
]
province_recovery_fig = isempty(province_recovery_results.params) ? nothing :
plot_recovery(
province_recovery_results.params, province_recovery_results.draws,
province_recovery_results.prior;
quantities = province_recovery_quantities,
labels = Dict(
"$(k)[$(p)]" => "$(v), $(p)" for (k, v) in _recovery_short
for p in PROVINCE_LABELS
),
panel_labels = Dict(
"$(k)[$(p)]" => p for (k, _) in _recovery_short for p in PROVINCE_LABELS
),
row_labels = last.(_recovery_short),
log_x = ["C_T_patch[$(p)]" for p in PROVINCE_LABELS]
);
Summary table across seeds
province_recovery_summary = isempty(province_recovery_results.params) ?
DataFrame() :
recovery_summary_table(province_recovery_results.params; province = true);
province_recovery_summary_display = isempty(province_recovery_summary) ?
Markdown.parse("No parameter-recovery run is available for this build.") :
MarkdownTable(province_recovery_summary);| Quantity | Truth, lowest | Truth, highest | Relative error, median | Relative error, range | z, median | Truth in 90% | Outside 99% |
|---|---|---|---|---|---|---|---|
| CFR_patch[Bas-Uele] | 0.248 | 0.593 | -0.08 | -0.16 to 0.07 | -0.41 | 3/3 | 0 |
| CFR_patch[Haut-Uele] | 0.202 | 0.508 | -0.01 | -0.04 to 0.31 | -0.06 | 3/3 | 0 |
| CFR_patch[Ituri] | 0.169 | 0.561 | 0 | -0.11 to 0.57 | 0.03 | 2/3 | 0 |
| CFR_patch[Nord-Kivu] | 0.202 | 0.541 | 0 | -0.07 to 0.32 | 0.06 | 3/3 | 0 |
| CFR_patch[Nord-Ubangi] | 0.196 | 0.537 | -0.08 | -0.15 to 0.35 | -0.53 | 3/3 | 0 |
| CFR_patch[Sud-Kivu] | 0.212 | 0.486 | 0.05 | -0.1 to 0.25 | 0.32 | 3/3 | 0 |
| CFR_patch[Sud-Ubangi] | 0.217 | 0.565 | 0.03 | -0.13 to 0.21 | 0.22 | 3/3 | 0 |
| CFR_patch[Tshopo] | 0.205 | 0.534 | 0.09 | -0.07 to 0.3 | 0.49 | 3/3 | 0 |
| C_T_patch[Bas-Uele] | 2 | 236 | 0.3 | 0.08 to 2.39 | 0.87 | 2/3 | 1 |
| C_T_patch[Haut-Uele] | 42.7 | 168 | 0.07 | -0.01 to 0.24 | 0.44 | 3/3 | 0 |
| C_T_patch[Ituri] | 2190 | 29700 | -0.02 | -0.14 to 0.03 | -0.05 | 3/3 | 0 |
| C_T_patch[Nord-Kivu] | 44.2 | 381 | 0.13 | 0.04 to 0.17 | 0.62 | 3/3 | 0 |
| C_T_patch[Nord-Ubangi] | 8.72 | 212 | -0.18 | -0.3 to -0.01 | -0.57 | 3/3 | 0 |
| C_T_patch[Sud-Kivu] | 113 | 157 | -0.09 | -0.1 to -0.02 | -0.23 | 3/3 | 0 |
| C_T_patch[Sud-Ubangi] | 11.6 | 48.9 | 0.32 | 0.15 to 0.49 | 1.11 | 3/3 | 0 |
| C_T_patch[Tshopo] | 10.2 | 61.5 | -0.11 | -0.2 to 0.34 | -0.13 | 3/3 | 0 |
| R_T_patch[Bas-Uele] | 1.18 | 1.72 | -0.03 | -0.22 to 0.13 | -0.11 | 2/3 | 0 |
| R_T_patch[Haut-Uele] | 0.974 | 1.51 | 0.04 | -0.14 to 0.43 | 0.35 | 2/3 | 0 |
| R_T_patch[Ituri] | 1.03 | 1.46 | 0.07 | -0.16 to 0.25 | 0.58 | 2/3 | 0 |
| R_T_patch[Nord-Kivu] | 0.768 | 1.43 | 0.1 | -0.13 to 0.25 | 0.69 | 3/3 | 0 |
| R_T_patch[Nord-Ubangi] | 1.27 | 2.23 | -0.09 | -0.22 to 0.07 | -0.64 | 3/3 | 0 |
| R_T_patch[Sud-Kivu] | 1.29 | 1.84 | -0.09 | -0.29 to 0.04 | -0.65 | 2/3 | 0 |
| R_T_patch[Sud-Ubangi] | 1.18 | 1.66 | -0.03 | -0.03 to 0.06 | -0.02 | 3/3 | 0 |
| R_T_patch[Tshopo] | 0.811 | 1.47 | 0.07 | -0.12 to 0.39 | 0.5 | 3/3 | 0 |
| province_ascertainment[Bas-Uele] | 1.17 | 1.27 | -0.19 | -0.26 to -0.05 | -1.65 | 1/3 | 0 |
| province_ascertainment[Haut-Uele] | 0.703 | 1.43 | -0.03 | -0.23 to 0.26 | -0.06 | 3/3 | 0 |
| province_ascertainment[Ituri] | 0.897 | 1.12 | -0.03 | -0.07 to 0.13 | -0.28 | 3/3 | 0 |
| province_ascertainment[Nord-Kivu] | 0.973 | 1.13 | -0.07 | -0.12 to 0.04 | -0.25 | 3/3 | 0 |
| province_ascertainment[Nord-Ubangi] | 0.498 | 1.36 | 0.39 | -0.19 to 0.74 | 1.86 | 1/3 | 0 |
| province_ascertainment[Sud-Kivu] | 0.791 | 0.871 | 0.16 | 0.1 to 0.23 | 1.02 | 2/3 | 0 |
| province_ascertainment[Sud-Ubangi] | 1.18 | 1.47 | -0.2 | -0.3 to -0.06 | -1.3 | 2/3 | 0 |
| province_ascertainment[Tshopo] | 0.784 | 1.04 | 0.16 | -0.08 to 0.28 | 0.79 | 3/3 | 0 |
| province_suspected_ascertainment[Bas-Uele] | 0.606 | 0.822 | 0.07 | -0.11 to 0.14 | 0.02 | 3/3 | 0 |
| province_suspected_ascertainment[Haut-Uele] | 0.566 | 0.813 | 0.1 | -0.11 to 0.19 | 0.53 | 3/3 | 0 |
| province_suspected_ascertainment[Ituri] | 0.537 | 0.903 | 0.01 | -0.05 to 0.07 | -0.06 | 3/3 | 0 |
| province_suspected_ascertainment[Nord-Kivu] | 0.724 | 0.819 | -0.01 | -0.37 to 0.24 | -0.16 | 2/3 | 0 |
| province_suspected_ascertainment[Nord-Ubangi] | 0.489 | 0.75 | 0.03 | -0.11 to 0.78 | 0.04 | 3/3 | 0 |
| province_suspected_ascertainment[Sud-Kivu] | 0.436 | 0.71 | 0.09 | 0.08 to 0.3 | 0.38 | 3/3 | 0 |
| province_suspected_ascertainment[Sud-Ubangi] | 0.604 | 0.773 | 0.1 | -0.08 to 0.16 | 0.49 | 3/3 | 0 |
| province_suspected_ascertainment[Tshopo] | 0.531 | 0.777 | 0.11 | 0.02 to 0.15 | 0.42 | 3/3 | 0 |
| region_drift_sd[Bas-Uele] | 0.016 | 0.119 | -0.19 | -0.47 to -0.16 | -0.13 | 2/3 | 0 |
| region_drift_sd[Haut-Uele] | 0.0121 | 0.0935 | -0.2 | -0.34 to 0.03 | -0.21 | 3/3 | 0 |
| region_drift_sd[Ituri] | 0.00998 | 0.115 | -0.03 | -0.41 to 0.24 | 0.14 | 2/3 | 0 |
| region_drift_sd[Nord-Kivu] | 0.00948 | 0.129 | -0.2 | -0.36 to 0.33 | -0.17 | 3/3 | 0 |
| region_drift_sd[Nord-Ubangi] | 0.00531 | 0.131 | -0.37 | -0.45 to 1.28 | -0.61 | 2/3 | 0 |
| region_drift_sd[Sud-Kivu] | 0.0083 | 0.132 | -0.31 | -0.52 to 0.47 | -0.52 | 2/3 | 0 |
| region_drift_sd[Sud-Ubangi] | 0.00616 | 0.0753 | -0.08 | -0.1 to 1.07 | 0.02 | 3/3 | 0 |
| region_drift_sd[Tshopo] | 0.0134 | 0.142 | -0.09 | -0.54 to -0.08 | 0.02 | 2/3 | 0 |
Each seed's recovered province values
province_recovery = let r = province_recovery_results.params
isempty(r) ? DataFrame() :
r[
occursin.("[", r.quantity), [
:seed, :quantity, :truth, :median, :lower_90, :upper_90,
:covered_90,
],
]
end;
province_recovery_display = isempty(province_recovery) ?
Markdown.parse("No parameter-recovery run is available for this build.") : MarkdownTable(province_recovery);| seed | quantity | truth | median | lower_90 | upper_90 | covered_90 |
|---|---|---|---|---|---|---|
| 1 | CFR_patch[Bas-Uele] | 0.274 | 0.252 | 0.181 | 0.336 | true |
| 1 | CFR_patch[Haut-Uele] | 0.262 | 0.251 | 0.183 | 0.336 | true |
| 1 | CFR_patch[Ituri] | 0.242 | 0.243 | 0.174 | 0.325 | true |
| 1 | CFR_patch[Nord-Kivu] | 0.249 | 0.248 | 0.181 | 0.333 | true |
| 1 | CFR_patch[Nord-Ubangi] | 0.306 | 0.259 | 0.187 | 0.352 | true |
| 1 | CFR_patch[Sud-Kivu] | 0.274 | 0.248 | 0.178 | 0.332 | true |
| 1 | CFR_patch[Sud-Ubangi] | 0.243 | 0.251 | 0.183 | 0.337 | true |
| 1 | CFR_patch[Tshopo] | 0.227 | 0.247 | 0.18 | 0.33 | true |
| 1 | C_T_patch[Bas-Uele] | 2.005 | 6.803 | 3.494 | 12.524 | false |
| 1 | C_T_patch[Haut-Uele] | 88.949 | 110.199 | 83.809 | 153.448 | true |
| 1 | C_T_patch[Ituri] | 11471.594 | 11248.935 | 9631.86 | 13686.914 | true |
| 1 | C_T_patch[Nord-Kivu] | 380.947 | 396.593 | 291.664 | 548.025 | true |
| 1 | C_T_patch[Nord-Ubangi] | 37.68 | 26.389 | 16.58 | 42.746 | true |
| 1 | C_T_patch[Sud-Kivu] | 113.196 | 102.333 | 73.7 | 150.677 | true |
| 1 | C_T_patch[Sud-Ubangi] | 42.219 | 55.881 | 38.663 | 79.78 | true |
| 1 | C_T_patch[Tshopo] | 61.529 | 48.94 | 33.981 | 71.413 | true |
| 1 | R_T_patch[Bas-Uele] | 1.375 | 1.561 | 1.237 | 1.999 | true |
| 1 | R_T_patch[Haut-Uele] | 1.511 | 1.573 | 1.257 | 2.022 | true |
| 1 | R_T_patch[Ituri] | 1.463 | 1.571 | 1.266 | 2.009 | true |
| 1 | R_T_patch[Nord-Kivu] | 1.429 | 1.571 | 1.256 | 2.004 | true |
| 1 | R_T_patch[Nord-Ubangi] | 1.467 | 1.569 | 1.258 | 2.007 | true |
| 1 | R_T_patch[Sud-Kivu] | 1.509 | 1.565 | 1.256 | 2.005 | true |
| 1 | R_T_patch[Sud-Ubangi] | 1.478 | 1.565 | 1.26 | 2.028 | true |
| 1 | R_T_patch[Tshopo] | 1.474 | 1.576 | 1.264 | 2.006 | true |
| 1 | province_ascertainment[Bas-Uele] | 1.269 | 0.937 | 0.528 | 1.173 | false |
| 1 | province_ascertainment[Haut-Uele] | 1.431 | 1.107 | 0.924 | 1.558 | true |
| 1 | province_ascertainment[Ituri] | 1.123 | 1.048 | 0.868 | 1.372 | true |
| 1 | province_ascertainment[Nord-Kivu] | 1.13 | 1.056 | 0.897 | 1.378 | true |
| 1 | province_ascertainment[Nord-Ubangi] | 0.498 | 0.868 | 0.498 | 1.059 | false |
| 1 | province_ascertainment[Sud-Kivu] | 0.871 | 1.009 | 0.806 | 1.282 | true |
| 1 | province_ascertainment[Sud-Ubangi] | 1.277 | 1.027 | 0.84 | 1.361 | true |
| 1 | province_ascertainment[Tshopo] | 0.784 | 0.999 | 0.768 | 1.277 | true |
| 1 | province_suspected_ascertainment[Bas-Uele] | 0.822 | 0.877 | 0.461 | 0.977 | true |
| 1 | province_suspected_ascertainment[Haut-Uele] | 0.813 | 0.894 | 0.666 | 0.977 | true |
| 1 | province_suspected_ascertainment[Ituri] | 0.903 | 0.916 | 0.767 | 0.981 | true |
| 1 | province_suspected_ascertainment[Nord-Kivu] | 0.724 | 0.898 | 0.681 | 0.977 | true |
| 1 | province_suspected_ascertainment[Nord-Ubangi] | 0.489 | 0.868 | 0.436 | 0.975 | true |
| 1 | province_suspected_ascertainment[Sud-Kivu] | 0.687 | 0.893 | 0.67 | 0.978 | true |
| 1 | province_suspected_ascertainment[Sud-Ubangi] | 0.773 | 0.893 | 0.673 | 0.976 | true |
| 1 | province_suspected_ascertainment[Tshopo] | 0.777 | 0.891 | 0.667 | 0.979 | true |
| 1 | region_drift_sd[Bas-Uele] | 0.016 | 0.013 | 0.00104 | 0.0497 | true |
| 1 | region_drift_sd[Haut-Uele] | 0.0121 | 0.0124 | 0.00101 | 0.0492 | true |
| 1 | region_drift_sd[Ituri] | 0.00998 | 0.0124 | 0.00105 | 0.0491 | true |
| 1 | region_drift_sd[Nord-Kivu] | 0.00948 | 0.0126 | 0.00113 | 0.045 | true |
| 1 | region_drift_sd[Nord-Ubangi] | 0.00531 | 0.0121 | 0.00106 | 0.0472 | true |
| 1 | region_drift_sd[Sud-Kivu] | 0.0083 | 0.0122 | 0.00102 | 0.0487 | true |
| 1 | region_drift_sd[Sud-Ubangi] | 0.00616 | 0.0127 | 0.00104 | 0.0498 | true |
| 1 | region_drift_sd[Tshopo] | 0.0134 | 0.0123 | 0.000978 | 0.0481 | true |
| 2 | CFR_patch[Bas-Uele] | 0.593 | 0.499 | 0.367 | 0.624 | true |
| 2 | CFR_patch[Haut-Uele] | 0.508 | 0.504 | 0.381 | 0.625 | true |
| 2 | CFR_patch[Ituri] | 0.561 | 0.499 | 0.369 | 0.62 | true |
| 2 | CFR_patch[Nord-Kivu] | 0.541 | 0.501 | 0.375 | 0.624 | true |
| 2 | CFR_patch[Nord-Ubangi] | 0.537 | 0.496 | 0.371 | 0.623 | true |
| 2 | CFR_patch[Sud-Kivu] | 0.486 | 0.511 | 0.384 | 0.635 | true |
| 2 | CFR_patch[Sud-Ubangi] | 0.565 | 0.494 | 0.365 | 0.619 | true |
| 2 | CFR_patch[Tshopo] | 0.534 | 0.495 | 0.365 | 0.622 | true |
| 2 | C_T_patch[Bas-Uele] | 235.585 | 254.041 | 172.87 | 387.453 | true |
| 2 | C_T_patch[Haut-Uele] | 42.667 | 42.282 | 26.079 | 70.967 | true |
| 2 | C_T_patch[Ituri] | 2190.954 | 2262.787 | 1613.871 | 3226.471 | true |
| 2 | C_T_patch[Nord-Kivu] | 44.242 | 51.648 | 33.254 | 81.344 | true |
| 2 | C_T_patch[Nord-Ubangi] | 211.842 | 173.179 | 108.441 | 281.429 | true |
| 2 | C_T_patch[Sud-Kivu] | 127.22 | 124.905 | 77.754 | 198.671 | true |
| 2 | C_T_patch[Sud-Ubangi] | 48.862 | 56.425 | 33.145 | 96.042 | true |
| 2 | C_T_patch[Tshopo] | 10.205 | 9.114 | 4.69 | 16.693 | true |
| 2 | R_T_patch[Bas-Uele] | 1.715 | 1.341 | 1.073 | 1.666 | false |
| 2 | R_T_patch[Haut-Uele] | 0.974 | 1.392 | 1.061 | 1.796 | false |
| 2 | R_T_patch[Ituri] | 1.027 | 1.282 | 1.063 | 1.601 | false |
| 2 | R_T_patch[Nord-Kivu] | 0.768 | 0.961 | 0.673 | 1.327 | true |
| 2 | R_T_patch[Nord-Ubangi] | 2.229 | 1.734 | 1.357 | 2.298 | true |
| 2 | R_T_patch[Sud-Kivu] | 1.844 | 1.314 | 1.02 | 1.676 | false |
| 2 | R_T_patch[Sud-Ubangi] | 1.663 | 1.616 | 1.247 | 2.207 | true |
| 2 | R_T_patch[Tshopo] | 0.811 | 1.131 | 0.777 | 1.541 | true |
| 2 | province_ascertainment[Bas-Uele] | 1.17 | 1.116 | 0.943 | 1.393 | true |
| 2 | province_ascertainment[Haut-Uele] | 0.703 | 0.888 | 0.605 | 1.119 | true |
| 2 | province_ascertainment[Ituri] | 0.974 | 0.941 | 0.762 | 1.123 | true |
| 2 | province_ascertainment[Nord-Kivu] | 1.054 | 0.927 | 0.675 | 1.16 | true |
| 2 | province_ascertainment[Nord-Ubangi] | 1.356 | 1.098 | 0.894 | 1.456 | true |
| 2 | province_ascertainment[Sud-Kivu] | 0.81 | 0.895 | 0.672 | 1.116 | true |
| 2 | province_ascertainment[Sud-Ubangi] | 1.181 | 1.113 | 0.886 | 1.549 | true |
| 2 | province_ascertainment[Tshopo] | 0.912 | 1.062 | 0.785 | 1.566 | true |
| 2 | province_suspected_ascertainment[Bas-Uele] | 0.606 | 0.542 | 0.356 | 0.791 | true |
| 2 | province_suspected_ascertainment[Haut-Uele] | 0.566 | 0.502 | 0.304 | 0.774 | true |
| 2 | province_suspected_ascertainment[Ituri] | 0.537 | 0.513 | 0.357 | 0.735 | true |
| 2 | province_suspected_ascertainment[Nord-Kivu] | 0.819 | 0.517 | 0.324 | 0.769 | false |
| 2 | province_suspected_ascertainment[Nord-Ubangi] | 0.621 | 0.55 | 0.356 | 0.805 | true |
| 2 | province_suspected_ascertainment[Sud-Kivu] | 0.436 | 0.473 | 0.287 | 0.722 | true |
| 2 | province_suspected_ascertainment[Sud-Ubangi] | 0.604 | 0.556 | 0.359 | 0.811 | true |
| 2 | province_suspected_ascertainment[Tshopo] | 0.531 | 0.544 | 0.338 | 0.808 | true |
| 2 | region_drift_sd[Bas-Uele] | 0.119 | 0.0625 | 0.0338 | 0.117 | false |
| 2 | region_drift_sd[Haut-Uele] | 0.0935 | 0.0621 | 0.0308 | 0.112 | true |
| 2 | region_drift_sd[Ituri] | 0.115 | 0.0683 | 0.0388 | 0.111 | false |
| 2 | region_drift_sd[Nord-Kivu] | 0.129 | 0.0826 | 0.0479 | 0.135 | true |
| 2 | region_drift_sd[Nord-Ubangi] | 0.131 | 0.072 | 0.0395 | 0.124 | false |
| 2 | region_drift_sd[Sud-Kivu] | 0.132 | 0.0629 | 0.0309 | 0.111 | false |
| 2 | region_drift_sd[Sud-Ubangi] | 0.0753 | 0.0696 | 0.0375 | 0.121 | true |
| 2 | region_drift_sd[Tshopo] | 0.142 | 0.0651 | 0.0335 | 0.122 | false |
| 3 | CFR_patch[Bas-Uele] | 0.248 | 0.264 | 0.188 | 0.348 | true |
| 3 | CFR_patch[Haut-Uele] | 0.202 | 0.264 | 0.192 | 0.347 | true |
| 3 | CFR_patch[Ituri] | 0.169 | 0.265 | 0.192 | 0.344 | false |
| 3 | CFR_patch[Nord-Kivu] | 0.202 | 0.267 | 0.193 | 0.349 | true |
| 3 | CFR_patch[Nord-Ubangi] | 0.196 | 0.265 | 0.191 | 0.348 | true |
| 3 | CFR_patch[Sud-Kivu] | 0.212 | 0.266 | 0.194 | 0.352 | true |
| 3 | CFR_patch[Sud-Ubangi] | 0.217 | 0.263 | 0.186 | 0.34 | true |
| 3 | CFR_patch[Tshopo] | 0.205 | 0.267 | 0.192 | 0.349 | true |
| 3 | C_T_patch[Bas-Uele] | 9.18 | 11.959 | 7.397 | 19.79 | true |
| 3 | C_T_patch[Haut-Uele] | 168.277 | 179.476 | 133.423 | 260.212 | true |
| 3 | C_T_patch[Ituri] | 29685.571 | 25430.263 | 21679.677 | 35085.561 | true |
| 3 | C_T_patch[Nord-Kivu] | 164.657 | 186.445 | 137.531 | 266.96 | true |
| 3 | C_T_patch[Nord-Ubangi] | 8.725 | 8.658 | 4.968 | 14.981 | true |
| 3 | C_T_patch[Sud-Kivu] | 157.284 | 143.694 | 105.111 | 214.14 | true |
| 3 | C_T_patch[Sud-Ubangi] | 11.623 | 17.364 | 11.066 | 27.543 | true |
| 3 | C_T_patch[Tshopo] | 12.643 | 16.944 | 10.51 | 27.619 | true |
| 3 | R_T_patch[Bas-Uele] | 1.179 | 1.149 | 0.902 | 1.442 | true |
| 3 | R_T_patch[Haut-Uele] | 1.365 | 1.179 | 0.942 | 1.449 | true |
| 3 | R_T_patch[Ituri] | 1.388 | 1.169 | 0.953 | 1.41 | true |
| 3 | R_T_patch[Nord-Kivu] | 1.303 | 1.138 | 0.876 | 1.421 | true |
| 3 | R_T_patch[Nord-Ubangi] | 1.274 | 1.157 | 0.9 | 1.442 | true |
| 3 | R_T_patch[Sud-Kivu] | 1.294 | 1.174 | 0.932 | 1.471 | true |
| 3 | R_T_patch[Sud-Ubangi] | 1.177 | 1.141 | 0.9 | 1.44 | true |
| 3 | R_T_patch[Tshopo] | 1.292 | 1.138 | 0.869 | 1.414 | true |
| 3 | province_ascertainment[Bas-Uele] | 1.228 | 0.997 | 0.76 | 1.227 | false |
| 3 | province_ascertainment[Haut-Uele] | 1.092 | 1.058 | 0.919 | 1.319 | true |
| 3 | province_ascertainment[Ituri] | 0.897 | 1.016 | 0.86 | 1.245 | true |
| 3 | province_ascertainment[Nord-Kivu] | 0.973 | 1.009 | 0.854 | 1.235 | true |
| 3 | province_ascertainment[Nord-Ubangi] | 0.709 | 0.986 | 0.733 | 1.206 | false |
| 3 | province_ascertainment[Sud-Kivu] | 0.791 | 0.969 | 0.791 | 1.121 | false |
| 3 | province_ascertainment[Sud-Ubangi] | 1.472 | 1.036 | 0.858 | 1.38 | false |
| 3 | province_ascertainment[Tshopo] | 1.035 | 0.955 | 0.67 | 1.133 | true |
| 3 | province_suspected_ascertainment[Bas-Uele] | 0.68 | 0.778 | 0.531 | 0.928 | true |
| 3 | province_suspected_ascertainment[Haut-Uele] | 0.661 | 0.787 | 0.552 | 0.932 | true |
| 3 | province_suspected_ascertainment[Ituri] | 0.741 | 0.79 | 0.566 | 0.93 | true |
| 3 | province_suspected_ascertainment[Nord-Kivu] | 0.784 | 0.779 | 0.547 | 0.922 | true |
| 3 | province_suspected_ascertainment[Nord-Ubangi] | 0.75 | 0.773 | 0.521 | 0.923 | true |
| 3 | province_suspected_ascertainment[Sud-Kivu] | 0.71 | 0.773 | 0.526 | 0.928 | true |
| 3 | province_suspected_ascertainment[Sud-Ubangi] | 0.715 | 0.786 | 0.559 | 0.932 | true |
| 3 | province_suspected_ascertainment[Tshopo] | 0.689 | 0.764 | 0.498 | 0.921 | true |
| 3 | region_drift_sd[Bas-Uele] | 0.0335 | 0.0281 | 0.00478 | 0.0698 | true |
| 3 | region_drift_sd[Haut-Uele] | 0.0352 | 0.028 | 0.00514 | 0.0669 | true |
| 3 | region_drift_sd[Ituri] | 0.0274 | 0.0265 | 0.00447 | 0.0659 | true |
| 3 | region_drift_sd[Nord-Kivu] | 0.0354 | 0.0284 | 0.00458 | 0.0691 | true |
| 3 | region_drift_sd[Nord-Ubangi] | 0.0434 | 0.0272 | 0.00442 | 0.0686 | true |
| 3 | region_drift_sd[Sud-Kivu] | 0.043 | 0.0295 | 0.0046 | 0.069 | true |
| 3 | region_drift_sd[Sud-Ubangi] | 0.0297 | 0.0268 | 0.00457 | 0.0667 | true |
| 3 | region_drift_sd[Tshopo] | 0.0306 | 0.0279 | 0.00464 | 0.0676 | true |
Saving province in-sample outputs
Write the summary bullets
# The bullets under the summary heading at the top of the page. They read
# tables built further down, so they are written here and read back when
# the site is assembled.
evaluation_insample_province_summary = let
fmt(x) = ismissing(x) || !isfinite(x) ? "n/a" :
string(round(x; digits = 2))
fitted = filter(r -> isfinite(r["Bias"]), province_calibration_table)
worst = first(
sort(fitted, "Bias"; by = abs, rev = true), min(3, size(fitted, 1))
)[!, "Stream"]
function coverage_bullet(heading, tbl, scale)
low = first(sort(tbl, "90% coverage"), min(1, size(tbl, 1)))
return string(
"- **", heading, ":** ", count(>=(0.8), tbl[!, "90% coverage"]),
" of ", size(tbl, 1), " province streams have 90% coverage of ",
"at least 0.8", scale,
size(low, 1) == 0 ? "." :
string(
"; the lowest is ", low[1, "Stream"], " at ",
fmt(low[1, "90% coverage"]), "."
)
)
end
overall = [
isempty(worst) ? nothing :
string(
"- **Least well reproduced:** ", join_names(worst),
length(worst) == 1 ? " has" : " have",
" the largest absolute bias in the province split."
),
coverage_bullet("Coverage", fitted, ""),
coverage_bullet(
"Count-scale coverage",
filter(
r -> isfinite(r["Bias"]), province_count_calibration_table
),
""
),
]
# One row per province and stream, the split and the count checks
# side by side. A check that was not scored reads n/a.
rows(tbl) = Dict(r["Stream"] => r for r in eachrow(tbl))
cal = rows(province_calibration_table)
count_cal = rows(province_count_calibration_table)
cells = [
(PROVINCE_LABELS[p], kind) for p in 1:N_PATCHES
for kind in ("Confirmed cases", "Confirmed deaths")
]
value(tbl, label, kind, col) = let r = get(
tbl, string(kind, ", ", label), nothing
)
r === nothing ? missing : finite_round(r[col])
end
column(tbl, col) = Union{Missing, Float64}[
value(tbl, label, kind, col) for (label, kind) in cells
]
table = DataFrame(
"Province" => first.(cells),
"Stream" => last.(cells),
"Bias (split)" => column(cal, "Bias"),
"90% coverage (split)" => column(cal, "90% coverage"),
"Bias (counts)" => column(count_cal, "Bias"),
"90% coverage (counts)" => column(count_cal, "90% coverage"),
)
join(
[
join(filter(!isnothing, overall), "\n"),
markdown_table(table; missing_text = "n/a"),
],
"\n\n"
)
end
dashboard_dir = joinpath(
pkgdir(BVDOutbreakSize), "docs", "src", "summary_assets"
)
mkpath(dashboard_dir)
write(
joinpath(dashboard_dir, "evaluation_insample_province.md"),
evaluation_insample_province_summary
);