mwss: Build model

View source: R/mwss.R

mwssR Documentation

Build model

Description

The function mwss build SimInf model usable either by mwss::multisim or SimInf::run. Vectors ward_names, pop_size_P, pop_size_H, nVisits, LS must be in the same order

Usage

mwss(ward_names, pop_size_P, pop_size_H, nVisits, LS, gdata,
       matContact = NULL, IMMstate = NULL, EPIstate = NULL,
       SA = FALSE, nH_SA = NULL, tSim =  365, verbose = TRUE)

Arguments

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).

gdata

Named numeric vector or one-row data.frame describing global parameters. (see ? SimInf::mparse) Should be generated using mwss::build_gdata.

matContact

Matrix of contact - for more details, see ? mwss::startvec.

IMMstate

Data.frame describing the initial immunity levels of patients and healthcare workers - for more details, see ? mwss::startvec. Default is NULL (all individuals are considered non immunized).

EPIstate

Data.frame describing the initial epidemiological states of patients and healthcare workers - for more details, see ? mwss::startvec. Default is NULL (all individuals are considered susceptible).

SA

Logical. Contact are restricted at the admission. Default is FALSE.

nH_SA

Vector of number of healthcare workers in charge of admissions in the screening area (clinical examination/test).

tSim

Integer. Number of simulated days (default is 365 days).

verbose

Logical used to display or shut down warning messages (default is TRUE).

Value

a SimInf_model object

Examples

data("toydata")
list2env(toydata,envir=.GlobalEnv)
gdata <- build_gdata()

## Use the mwss function to create a 'SimInf_model' object that
## expresses an complex compartmental model developed for structured healthcare systems

model <- mwss(ward_names, pop_size_P, pop_size_H, nVisits, LS, gdata, tSim = 30)


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