For each infected node on the network, find susceptible neighbors and
probabilistically spread the infection.
infect(agents, neighbors, x0 = -2.556)
Arguments
| agents |
A data.table containing agent information. |
| neighbors |
A list of data.tables, each containing the neighbors on
a different network.
Neighbor data.tables have columns:
head: the head vertex
tail: the tail vertex
edge_type: the kind of network (e.g., "home", "social", or "work")
freq: the frequency of contacts on this edge (times per day the two
agents are in close contact).
strength: the intensity/closeness of the contact (e.g., health-care
visits are very strong, paying a cashier at a store would be rather
weak).
|
| x0 |
The unmodified mean infection value.. |
Value
A modified network graph after propagating the infections.
Examples
# ADD_EXAMPLES_HERE