View source: R/plot_nosoHazard.R
plot_nosoHazard | R Documentation |
plot_nosoHazard
function returns a network plot of the wards whose colors represent
the average daily risk of contracting a nosocomial infection for one patient of the ward .
This average daily risk is calculated by dividing the average daily incidence by the average daily turnover (number of beds divided by the average length of stay).
Associated risk-colors grade from white to red.
plot_nosoHazard(
trajmwss, ward_names, pop_size_P, LS,
matContact, layout = "with_fr", vertexsize = 0.5,
vertexlabelsize = 0.03, edgearrowsize = 0.4, addtitle = FALSE,
maxcolors = FALSE, verbose = TRUE)
trajmwss |
list of trajectories generated by |
ward_names |
string vector of ward names |
pop_size_P |
numerical vector of patient population sizes |
LS |
numerical vector of length of stay |
matContact |
Matrix reporting the proportion of time spent by health care workers in the different wards. |
layout |
String. Graph layout (details: ? igraph::layout_). Default is "with_fr". Options: "as_star","as_tree","in_circle","nicely","on_grid","on_sphere", "randomly","with_dh","with_fr","with_gem","with_graphopt", "with_kk","with_lgl", "with_mds", "with_sugiyama" |
vertexsize |
Integer. Defines the nodes/ward size (default is 0.5). |
vertexlabelsize |
Integer. Defines the nodes/ward names size (default is 0.03). |
edgearrowsize |
Integer. Defines the edge arrows size (default is 0.4). |
addtitle |
logical for optional title. Default is FALSE, |
maxcolors |
integer. Limit the number of colors displayed in the legend (default is FALSE) |
verbose |
Default is TRUE |
Igraph 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)
matContact <- randomContacts(pop_size_H, ward_names)$contactMat
plot_nosoHazard(results,
ward_names,
pop_size_P,
LS,
matContact,
layout = "nicely",
vertexsize = 0.5,
vertexlabelsize = 0.03,
edgearrowsize = 0.4,
addtitle = TRUE,
maxcolors = FALSE,
verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.