Description Usage Arguments Details Value
sim_vacc
simulates the number of vaccinated individuals at scale
1 2 3 4 5 6 7 8 9 10 11 12 |
vacc_est |
numeric vector of coverage estimates (either 0, 1 or the number vaccinated) |
vacc_locs |
vector of numeric or character ids of same length as |
S, V, N, |
numeric vector of Susceptibles, Vaccinated, and the Population size respectively, of same length |
loc_ids |
vector of numeric or character ids of same length as S/V/N that
matches the demographic vectors to the locations from |
bins |
numeric, the total number of grid cells being simulated (i.e. at the scale of the simulation, this can be different than the scale of the vaccination campaigns) OR the number of admin units, for when simulating at admin rather than grid cell level, defaults to NULL |
row_ids |
numeric vector of same length as S/V/N of the row id corresponding to the demographic vectors to sample which grid cell or admin unit vaccinations are allocated to (if admin unit the same as loc_ids) |
row_probs |
numeric vector, optionally can pass the probability of vaccination for each grid cell, defaults to NULL. |
coverage |
boolean, defaults to TRUE, if TRUE then coverage estimates 0, 1 are translated to numbers with rbinom and then allocated, if FALSE then number vaccinated are allocated (constrained to the available susceptible dogs) |
Translates coverage estimates from sim_campaigns
or from user defined data.table of location specific vaccination coverage/numbers
filtered to the current timestep into numbers of vaccinated individuals in each
grid cell at the scale specified in the simulation. Assumes that all currently vaccinated
individuals are revaccinated (so campaigns are not additive). If scale of vaccination is at a coarser
resolution (i.e. at village level) allocates to grid cell based on number of susceptibles available.
This can also be modified by passing row_probs
, grid cell level probabilities of vaccination (i.e. based on household surveys or spatial covariates).
To Do:
Tests/ catches for lengths? This might slow things down! (maybe should be higher level test/catch)
Tests: return should be same length as bins, should be positive integer & non NA
a numeric vector of length bins of the number of currently vaccinated individuals in each grid cell
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.