Description Usage Arguments Value Examples
sis_simulation
is a generic function that takes a graph represented
either by an adjacency matrix (of class simnetr_matrix) or an adjacency list
(of class simnetr_list) and simulates an SIS simulation for a given rate of
infection, rate of recovery and duration.
1 | sis_simulation(graph, tau, gam, max_time, i0)
|
graph |
The representation of the network. |
tau |
Per link infection rate. |
gam |
Per node recovery rate. |
max_time |
Maximum simulation runtime. |
i0 |
Initial number of infective individuals |
list containing timeseries of events and the corresponding timeseries of number of infectious individual.
1 2 | graph <- erdos_matrix_r(N = 1000, avk = 7)
ts <- sis_simulation(graph, tau = 0.5, gam = 1, max_time = 5, i0 = 50, N = 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.