bootstrap_simulated_plot
takes output of first_infection_list
and
outbreak_dataset_read
and uses discrete_SIR_simulator
to simulate
a number of SIR epidemics, which are then summarised and plotted. Returns ggplot
object for plotting.
1 2 3 4 5 | bootstrap_simulated_plot(R0 = 1.8, I = 3, first_infection_list,
outbreak.dataset, replicates = 2000, sampling = FALSE,
lower.quantile = 0.25, upper.quantile = 0.75, title = NULL,
alpha = 0.2, size = 1, include.line = TRUE, include.observed = FALSE,
exponential = FALSE)
|
R0 |
Reproductive number. Default = 1.8 |
I |
Number of initial seed infections. Default = 3 |
first_infection_list |
Infection list outputted by |
outbreak.dataset |
Outbreak dataset outputted by |
replicates |
Numerical describing number of bootstrap replicates. Default = 2000 |
sampling |
Boolean determining if recovery and generation times should be sampled from the observed or drawn fro a poisson with mean equal to mean of the observed. Default = FALSE (poisson draws used) |
lower.quantile |
Numeric between 0 and 0.5 describing the lower quantile for each trace. Default = 0.25 |
upper.quantile |
Numeric between 0.5 and 1 describing the lower quantile for each trace. Default = 0.75 |
title |
Plot title. If NULL then no title will be added. Defult = NULL |
alpha |
Translucency of quantiles. Default = 0.2 |
size |
Line width. Default = 1 |
include.line |
Boolean describing whether to plot with the line or just the quantiles. Default = TRUE |
include.observed |
Boolean describing whether to include the observed epidemic alongisde the simulated epidemic. If this is true, N will be calculated from outbreak.dataset |
exponential |
Boolean determining if infection is exponential or not within the simulation. If FALSE (Default) then the number of secondary infections from an individual is takes into account S/N |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.