View source: R/plot_incidence.R
plot_incidence | R Documentation |
The function plot_incidence
returns a barplot representing the average cumulative incidence over simulations at different scales and for different populations
plot_incidence(
trajmwss, scale = 0,
pop = FALSE, iter = FALSE,
ward = FALSE, display_sd = TRUE)
trajmwss |
List of data.table. Epidemiological trajectories simulated by the function |
scale |
Integer. Indicated the scale for statistics: 0/ whole facility, 1/ wards. |
pop |
String. Define a subpopulation for statistics ("P":Cumulative incidence among patients, "Psymp": Cumulative incidence among patients (only considering symptomatics), "H": Cumulative incidence among professionals, "Hsymp": Cumulative incidence among professionals (only considering symptomatics); default is FALSE: considering all individuals). |
iter |
Integer. Define a specific simulation. Default is FALSE, providing average values over all simulations. |
ward |
String. Define a specific ward. Default is FALSE, considering all wards. At the facility scale '0' no ward can be specified. |
display_sd |
Logical. Determine standard deviation display. Default is TRUE. |
Cumulative incidence plot.
data("toydata")
list2env(toydata,envir=.GlobalEnv)
gdata <- build_gdata()
model <- mwss(ward_names, pop_size_P, pop_size_H, nVisits, LS, gdata, tSim = 30)
results <- multisim(model, 5, ward_names)
plot_incidence(trajmwss = results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.