`nosoi`

simulation`R/output_nosoiSummary.R`

`nosoiSummary.Rd`

This function provides summary information about the simulation (number of infected hosts, R0, etc.) as a list.

nosoiSummary(object) # S3 method for nosoiSim summary(object, ...)

object | Output of a nosoi simulation (object of class |
---|---|

... | further arguments passed to or from other methods. |

All computed data is provided in a list:

- R0
Provides a sublist with number of inactive hosts at the end of the simulation

`N.inactive`

, mean R0`R0.mean`

, and R0 distribution`R0.dist`

. For more details, see`getR0`

.- dynamics
`data.table`

with the count of currently infected (i.e. active) hosts at each time step of the simulation (by state if the simulation was in a discrete structured host population). For more details, see`getDynamic`

.- cumulative
`data.table`

with the cumulative count of infected hosts at each time step of the simulation. For more details, see`getCumulative`

.

You can directly compute each elements of the list without using the summarise function. See `getR0`

, `getDynamic`

and `getCumulative`

.

# \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)#>#>#>#>#>nosoiSummary(test.nosoi)#> $R0 #> $R0$N.inactive #> [1] 1 #> #> $R0$R0.mean #> [1] 0 #> #> $R0$R0.dist #> [1] 0 #> #> #> $dynamics #> t Count type #> 1: 0 0 H #> 2: 1 1 H #> 3: 2 1 H #> 4: 3 1 H #> 5: 4 0 H #> 6: 5 0 H #> #> $cumulative #> t Count type #> 1: 0 0 H #> 2: 1 1 H #> 3: 2 1 H #> 4: 3 1 H #> 5: 4 1 H #> 6: 5 1 H #># }