The most recent weeks of surveillance data are almost always incomplete
because of reporting delays (right truncation). get_ncast uses
baselinenowcast to
estimate what those counts will look like once all reports arrive.
Arguments
- df
An
accidda_dataobject fromcheck_dataorget_data. Must have revision history ($history == TRUE); useget_data(revisions = TRUE).- max_delay
Integer. Maximum reporting delay in weeks. Default 4.
- draws
Integer. Number of posterior samples. Default 1000.
- prop_delay
Numeric 0-1. Proportion of reference times used for delay estimation. Default 0.5.
- scale_factor
Numeric. Multiplicative factor on the maximum delay for the estimation window. Default 3.
Value
An accidda_ncast object (a list) with:
- data
Corrected time series. The
observationcolumn contains the nowcast median for the corrected weeks. Two extra columns,ncast_lowerandncast_upper(95\ used byget_fcastto propagate nowcast uncertainty.- plot
ggplot2 visualisation of the nowcast correction.
Details
With the default max_delay = 4, the last 4 weeks are treated as
right-truncated and replaced by nowcast estimates. Everything before that
is left untouched.
The function returns three corrected versions of the full series
(nowcast median, lower, and upper 95\
get_fcast can propagate nowcast uncertainty into the
final forward-looking forecast.
