add_max_observed_delay | R Documentation |
This function calculates and adds the maximum observed delay for each group and reference date in the provided dataset. It first checks the validity of the observation indicator and then computes the maximum delay. If an observation indicator is provided, it further adjusts the maximum observed delay for unobserved data to be negative 1 (indicating no maximum observed).
add_max_observed_delay(new_confirm, observation_indicator = NULL)
new_confirm |
A data.table containing the columns: "reference_date",
"delay", ".group", "new_confirm", and "max_obs_delay".
As produced by |
observation_indicator |
A character string specifying the column name
in |
A data.table with the original columns of new_confirm
and an
additional "max_obs_delay" column representing the maximum observed delay
for each group and reference date. If an observation indicator is provided,
unobserved data will have a "max_obs_delay" value of -1.
Helper functions for model modules
add_pmfs()
,
convolution_matrix()
,
enw_reference_by_report()
,
enw_reps_with_complete_refs()
,
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.