View source: R/model-module-helpers.R
enw_reps_with_complete_refs | R Documentation |
Identify report dates with complete (i.e up to the maximum delay) reference dates
enw_reps_with_complete_refs(new_confirm, max_delay, by = NULL, copy = TRUE)
new_confirm |
|
max_delay |
The maximum number of days to model in the delay
distribution. Must be an integer greater than or equal to 1. Observations
with delays larger then the maximum delay will be dropped. If the specified
maximum delay is too short, nowcasts can be biased as important parts of the
true delay distribution are cut off. At the same time, computational cost
scales non-linearly with this setting, so you want the maximum delay to be as
long as necessary, but not much longer. Consider what delays are realistic
for your application, and when in doubt, check if increasing the maximum
delay noticeably changes the delay distribution or nowcasts as estimated by
epinowcast. If it does, your maximum delay may still be too short.
Note that delays are zero indexed and so include the reference date and
|
by |
A character vector describing the stratification of observations. This defaults to no grouping. This should be used when modelling multiple time series in order to identify them for downstream modelling |
copy |
A logical; if |
A data.frame
containing a report_date
variable, and grouping
variables specified for report dates that have complete reporting.
Helper functions for model modules
add_max_observed_delay()
,
add_pmfs()
,
convolution_matrix()
,
enw_reference_by_report()
,
extract_obs_metadata()
,
extract_sparse_matrix()
,
latest_obs_as_matrix()
,
simulate_double_censored_pmf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.