This function determines which general settings the user wants to use for his simulation. All other arguments are passed down to the chosen simulator itself, such as singleNone, singleDiscrete, singleContinuous, dualNone, dualDiscrete or dualContinuous.
nosoiSim(type = "single", popStructure = "none", ...)
| type | specifies which type of pathogen we are interested in, either "single" or "dual"-host (e.g. arboviruses). |
|---|---|
| popStructure | specifies if the population in which the transmission is to occur is structured ("none", "discrete" or "continuous"). |
| ... | arguments to be passed on to the chosen simulator itself, such as |
An object of class nosoiSim, containing all results of the simulation. Class nosoiSim object have the following slots:
Number of time steps the simulation ran (integer).
String giving the simulation type ("single" or "dual" host).
nosoiSimOneNumber of infected hosts (integer).
Table containing the results of the simulation (see getTableHosts for more details on the table).
Table containing the results of the simulation, focusing on the movement history of each host (see getTableState for more details on the table).
String containing the prefix used to name hosts (character string).
String giving the population structure (one of "none", "discrete" or "continuous").
nosoiSimOneSame structure as host.info.A, but for host B (if it exists).
singleNone, singleDiscrete,
singleContinuous, dualNone,
dualDiscrete and dualContinuous.
# \donttest{ t_incub_fct <- function(x){rnorm(x,mean = 5,sd=1)} p_max_fct <- function(x){rbeta(x,shape1 = 5,shape2=2)} p_Exit_fct <- function(t){return(0.08)} proba <- function(t,p_max,t_incub){ if(t <= t_incub){p=0} if(t >= t_incub){p=p_max} return(p) } time_contact = function(t){round(rnorm(1, 3, 1), 0)} test.nosoi <- nosoiSim(type="single", popStructure="none", length=40, max.infected=100, init.individuals=1, nContact=time_contact, param.nContact=NA, pTrans = proba, param.pTrans = list(p_max=p_max_fct, t_incub=t_incub_fct), pExit=p_Exit_fct, param.pExit=NA)#> #>#>#> #>test.nosoi#> A nosoiSim object, representing a simulated epidemy for a single host with no structure. #> The simulation has run for 2 units of time and a total of 1 hosts have been infected. #> Use function 'summary' for summary statistics, and functions 'getTableHosts' and 'getTableState' to extract the generated data.# }