scan_R0_date | R Documentation |
Run a grid search of the particle filter over R0 and start date.
This is parallelised, first run plan(multiprocess)
to set
this up.
scan_R0_date( R0_min, R0_max, R0_step, first_start_date, last_start_date, day_step, data, model_params, Rt_func = function(R0_change, R0, Meff) { exp(log(R0) - Meff * (1 - R0_change)) }, R0_prior = NULL, R0_change = NULL, date_R0_change = NULL, date_contact_matrix_set_change = NULL, date_ICU_bed_capacity_change = NULL, date_hosp_bed_capacity_change = NULL, squire_model = explicit_SEIR(), pars_obs = NULL, n_particles = 100 )
R0_min |
Minimum value of R0 in the search |
R0_max |
Maximum value of R0 in the search |
R0_step |
Step to increment R0 between min and max |
first_start_date |
Earliest start date as 'yyyy-mm-dd' |
last_start_date |
Latest start date as 'yyyy-mm-dd' |
day_step |
Step to increment date in days |
data |
Deaths data to fit to. See |
model_params |
Squire model parameters. Created from a call to one of
the |
Rt_func |
Function for converting R0, Meff and R0_change. Function must
have names arguments of R0, Meff and R0_change. Default is linear relationship
on the log scale given by |
R0_prior |
Prior for R0. Default = NULL, which is a flat prior. Should be provided as a list with first argument the distribution function and the second the function arguments (excluding quantiles which are worked out based on R0_min and R0_max), e.g. 'list("func" = dnorm, args = list("mean"= 3.5, "sd"= 3))'. |
R0_change |
Numeric vector for relative changes in R0. Default = NULL, i.e. no change in R0 |
date_R0_change |
Calendar dates at which R0_change occurs. Defaut = NULL, i.e. no change in R0 |
date_contact_matrix_set_change |
Calendar dates at which the contact matrices
set in |
date_ICU_bed_capacity_change |
Calendar dates at which ICU bed
capacity changes set in |
date_hosp_bed_capacity_change |
Calendar dates at which hospital bed
capacity changes set in |
squire_model |
A squire model. Default = |
pars_obs |
list of parameters to use for the comparison function. |
n_particles |
Number of particles. Positive Integer. Default = 100 |
List of R0 and start date grid values, and normalised probabilities at each point
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.