plot_incidence: Plot the cumulative incidence

View source: R/plot_incidence.R

plot_incidenceR Documentation

Plot the cumulative incidence

Description

The function plot_incidence returns a barplot representing the average cumulative incidence over simulations at different scales and for different populations

Usage

plot_incidence(
          trajmwss, scale = 0,
          pop = FALSE, iter = FALSE,
          ward = FALSE, display_sd = TRUE)

Arguments

trajmwss

List of data.table. Epidemiological trajectories simulated by the function mwss::multisim

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.

Value

Cumulative incidence plot.

Examples


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)


MESuRS-Lab/mwss documentation built on Sept. 12, 2023, 12:08 a.m.