Skip to contents

Susceptible-Infected spreading on a fixed network. Each node carries a probability rho_i(t) of being infected and obeys the mean-field reaction rate equation d rho_i / dt = beta (1 - rho_i) sum_j A_ij rho_j, which is Pastor-Satorras & Vespignani's eq. (7) written per node rather than per degree class: with k_i = sum_j A_ij and Theta_i = sum_j A_ij rho_j / k_i the probability that a link out of node i points at an infected node, the right-hand side is beta k_i (1 - rho_i) Theta_i. Dropping the recovery term -rho_i of eq. (7) gives SI rather than SIS.

Usage

Siepid(G, beta, initial, t_max = 20, dt = 0.01)

Arguments

G

Square adjacency matrix, one row/column per node.

beta

Per-edge infection rate.

initial

Initial infection probability of each node, in [0, 1].

t_max

Integration horizon. Default 20.

dt

Runge-Kutta step. Default 0.01.

Value

List with estimate (final prevalence), prevalence, rho_final, rho_initial, theta (eq. (9)), mean_degree, second_moment, half_time, n, beta, t_max, dt, method.

Details

Integrated with classical fourth-order Runge-Kutta on a fixed step, so the result is deterministic and identical in every language arm.

References

Pastor-Satorras, R. & Vespignani, A. (2001). Epidemic dynamics and endemic states in complex networks. Physical Review E 63, 066117, eqs. (7)-(10). doi:10.1103/PhysRevE.63.066117

Examples

G <- matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3, 3, byrow = TRUE)
Siepid(G, beta = 0.3, initial = c(1, 0, 0))
#> $estimate
#> [1] 0.9980957
#> 
#> $prevalence
#> [1] 1.0000000 0.9999679 0.9943191
#> 
#> $rho_final
#> [1] 0.9980957
#> 
#> $rho_initial
#> [1] 0.3333333
#> 
#> $theta
#> [1] 0.9985637
#> 
#> $mean_degree
#> [1] 1.333333
#> 
#> $second_moment
#> [1] 2
#> 
#> $half_time
#> [1] 1.65
#> 
#> $n
#> [1] 3
#> 
#> $beta
#> [1] 0.3
#> 
#> $t_max
#> [1] 20
#> 
#> $dt
#> [1] 0.01
#> 
#> $method
#> [1] "Network SI epidemic, individual-based mean field (Pastor-Satorras & Vespignani 2001, eq. 7)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"