Description Usage Arguments Value Examples
Runs a series of independent simulations for a series of seeds, and outputs a seed(s) that give a desired final size, as well as a histogram of all final sizes.
1 | Seed_finder(model, N, ..., betas, ds, size, error, seeds)
|
model |
Takes values "Unif", "Clust", "Edge", "Latt", "Lines", or "Trials", corresponding to the appropriate distance matrix function. |
N |
The population size. |
... |
The parameters of the specifief distance matrix function (see example). |
betas |
A vector of infection rates, used for the Beta_mat_form function. |
ds |
A vector of distances at which the infection rate changes, used for the Beta_mat_form function. |
size |
The final size of the epidemic that is desired (total number infected). |
error |
The allowed error on the final size above and below. |
seeds |
The number of seeds desired to be tested. Always iterates from 1:seeds. |
A histogram of the final size of all tested simulations, and a table of seeds and final sizes that fit the requirements.
1 2 3 4 | Seed_finder("Clust",
N=100, xlim = 20, ylim = 20, centres = 5, spread = 1,
betas = c(0.1, 0.001), ds = 0.25,
size = 25, error = 2, seeds = 250)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.