Description Usage Arguments Value See Also Examples

View source: R/output_nosoiSummary.R

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

1 2 3 4 | ```
nosoiSummary(object)
## S3 method for class '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`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.