
Three-panel diagnostic plot for a fitted nowcast
Source:R/26_nowcast_diagnostic.R
nowcast_diagnostic.RdProduces three stacked panels: (1) reporting-delay histogram with the
fitted density, (2) smoothed latent incidence lambda with 50/90% CI, and (3)
posterior-predictive nowcast with observed counts. Requires the
patchwork package for a combined output.
Usage
nowcast_diagnostic(
object,
n_draws = NULL,
seed = sample.int(.Machine$integer.max, 1),
previous_times = 30
)Arguments
- object
A
nowcast_classobject.- n_draws
Number of posterior draws (default: min(
object@n_draws, 500)).- seed
Optional RNG seed.
- previous_times
Number of most recent event-times to display in panels 2 (smoothed incidence) and 3 (nowcast): only the last
previous_timesdates (including the nowcast target) are shown, as inautoplot(). Panel 1 (the delay distribution) always uses all delays. Default30; useInf(orNULL) to show every event-time.