sample_cases_history | R Documentation |
The distribution being drawn from at each onset time t is given by:
p(cases_true_t|data, Rt, reporting_params, serial_params) \propto p(data|cases_true, reporting_params)
p(cases_true_t|cases_true_t_1, cases_true_t_2, ..., Rt, serial_params)
sample_cases_history(
observation_onset_df,
max_cases,
Rt_function,
serial_parameters,
reporting_parameters,
p_gamma_cutoff = 0.99,
maximise = FALSE,
kappa = NULL,
is_negative_binomial = FALSE
)
observation_onset_df |
a tibble with four columns: time_onset, time_reported, cases_reported, reporting_piece_index |
max_cases |
maximum possible cases thought to arise on a given day |
Rt_function |
takes day as an input and outputs an Rt value |
serial_parameters |
named list of 'mean' and 'sd' of gamma distribution characterising the serial interval distribution |
reporting_parameters |
a tibble with three columns: reporting_piece_index, mean, sd. |
p_gamma_cutoff |
a p value (0 <= p <= 1) indicating the threshold above which we deem certainty |
maximise |
rather than sample a case count give the case count with the maximum probability (by default is FALSE) |
kappa |
overdispersion parameter |
is_negative_binomial |
if negative-binomial renewal model specified (defaults to FALSE) |
a tibble with an extra cases_estimated column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.