The SIR model is a compartmental model for infectious
diseases that divides the population into three states:
Susceptible, Infected, and Recovered.
It assumes that individuals gain permanent immunity after
recovery.
The model is defined by two state transitions:
$$S \stackrel{\beta S I / N}{\longrightarrow} I$$
$$I \stackrel{\gamma I}{\longrightarrow} R$$
where \(\beta\) is the transmission rate, \(\gamma\) is the
recovery rate, and \(N = S + I + R\) is the total population
size in each node. Here, \(S\), \(I\), and \(R\) represent
the number of susceptible, infected, and recovered individuals in
that specific node.
The argument u0 must be a data.frame with one row for
each node with the following columns:
- S
The number of susceptible individuals in each node
- I
The number of infected individuals in each node
- R
The number of recovered individuals in each node