startvec | R Documentation |
startvec
returns two objects: u0, a data.frame of initial demographic, epidemiological and immunity
states of the population, and ldata: matrix with local (ward-level) parameters required by SimInf package.
ldata contains for each ward the proportion of time spent by professionals of the ward X in the different wards (H_dest_X
) and
the origin ward proportions for the professionals acting in the ward X (H_origine_X
). In a disconnected
facility, H_dest_X
and H_origin_X
will be equal to 1 (professionals of the ward only work in ward X
and all professionals working in the ward X are affiliated to ward X).
nP
the number of beds in each ward, nV
the average number of visit per patient per day,
tLS
the average length of stay in each ward.
u0
describes the distribution of patients and professionals in the
different wards and compartments (compartments are detailed in the vignette).
By default all patients and professionals are susceptible and non immune.
Other states can be specified using IMMstate
and EPIstate
.
startvec(ward_names, pop_size_P, pop_size_H, nVisits, LS,
matContact = NULL, IMMstate = NULL, EPIstate = NULL,
SA = FALSE, nH_SA = NULL, verbose = TRUE)
ward_names |
String vector. Contains ward ids. |
pop_size_P |
Numerical vector. Contains the number of beds per ward (ordered as ward_names). |
pop_size_H |
Numerical vector. Contains the number of professionals affiliated to each ward (ordered as ward_names). |
nVisits |
Numerical vector. Contains the average daily numbers of visits per ward (ordered as ward_names). |
LS |
Numerical vector. Contains the average length of stay per ward (in days, ordered as ward_names). |
matContact |
Square matrix. Contains the average proportion of time (
Wards order in rows and columns must be ordered as ward_names. Row sums should be equal to 1. Use |
IMMstate |
Data.frame. Contains 4 columns specifying immunity of patients and professionals:
|
EPIstate |
Data.frame. Contains 5 columns specifying epidemiological state for patients and professionals and any subpopulation:
|
SA |
Logical. Activate the implementation of a screening area at the admission: contact are restricted (no contact with other patients of the ward) before clinical diagnostic and test. Default is FALSE. |
nH_SA |
Numerical vector. Contains the number of professionals in charge of admissions in the screening area when implemented ( |
verbose |
Logical. Activate messages display. |
List
data("toydata")
list2env(toydata,envir=.GlobalEnv)
gdata <- build_gdata()
matContact <- randomContacts(pop_size_H, ward_names)$contactMat
IMMstate <- data.frame(
ward = c("a", "c", "b"),
pop = c("P","P", "H"),
imm = c("LI", "HI", "HI"),
n = c(3, 2, 10)
)
EPIstate <- data.frame(
ward = c("b", "d"),
pop = c("P","H"),
imm = c("NI", "NI"),
epi = c("E", "E"),
n = c(1, 1)
)
## Disconnected wards all susceptible and non immune, no screening area at the admission
startvec(ward_names, pop_size_P, pop_size_H, nVisits, LS,
matContact = NULL, IMMstate = NULL, EPIstate = NULL,
SA = FALSE, nH_SA = NULL, verbose = FALSE)
## Connected wards all susceptible and non immune, no screening area at the admission
startvec(ward_names, pop_size_P, pop_size_H, nVisits, LS,
matContact = matContact, IMMstate = NULL, EPIstate = NULL,
SA = FALSE, nH_SA = NULL, verbose = FALSE)
## Connected wards all susceptible but with immune individuals, no screening area at the admission
startvec(ward_names, pop_size_P, pop_size_H, nVisits, LS,
matContact = matContact, IMMstate = IMMstate, EPIstate = NULL,
SA = FALSE, nH_SA = NULL, verbose = FALSE)
## Connected wards with immune and infected individuals, no screening area at the admission
startvec(ward_names, pop_size_P, pop_size_H, nVisits, LS,
matContact = matContact, IMMstate = IMMstate, EPIstate = EPIstate,
SA = FALSE, nH_SA = NULL, verbose = FALSE)
## Connected wards with immune and infected individuals, including the implementation of a
## screening area at the admission with one professional in charge of admission per ward
startvec(ward_names, pop_size_P, pop_size_H, nVisits, LS,
matContact = matContact, IMMstate = IMMstate, EPIstate = EPIstate,
SA = TRUE, nH_SA = rep(1, 5), verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.