sample_Rt_single_piece | R Documentation |
Sample a single Rt value corresponding to a single piecewise- constant element of an Rt vector
sample_Rt_single_piece(
Rt_piece_index,
cases_history_df,
Rt_prior_parameters,
serial_parameters,
kappa = NULL,
serial_max = 40,
ndraws = 1,
maximise = FALSE,
is_negative_binomial = FALSE,
nresamples = 100
)
Rt_piece_index |
the index of the Rt piece being sampled |
cases_history_df |
a tibble with three columns: time_onset, cases_true and Rt_index |
Rt_prior_parameters |
a list with elements 'shape' and 'rate' describing the gamma prior for Rt |
serial_parameters |
named list of 'mean' and 'sd' of gamma distribution characterising the serial interval distribution |
kappa |
overdispersion parameter |
serial_max |
maximum point at which to truncate sum in renewal process |
ndraws |
number of draws of Rt |
maximise |
rather than sample a case count give the case count with the maximum probability (by default is FALSE) |
is_negative_binomial |
if negative-binomial renewal model specified (defaults to FALSE) |
nresamples |
number of importance resamples of Rt to perform if assuming a negative binomial model |
a draw (or draws) for Rt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.