migraph 1.2.0 manynet 0.3.1

Describing the Network

For this assignment, I am using the labelled, weighted, and undirected ison_starwars Episode I network of 38 nodes and 135 ties. Let’s first examine the network visualized by faction.

## The number of groups was reduced since there were groups with less than 2 nodes.

Now let’s examine the network grouped by homeworld, specifically nodes from Naboo and Tatooine.

## The number of groups was reduced since there were groups with less than 2 nodes.

Let’s look at some basic descriptions of this network that can affect the diffusion process.

## [1] 7
## [1] 3.05
## [1] 0.192
## [1] 1
## [1] 0.511
## [1] 0.3
## [1] 0.586
## [1] 0.7

The maximum path length is 7, and the average path length is just over 3, which is small, so it likely won’t take many steps for a disease to diffuse over the network. The network density is only 0.192 which indicates that the network is more sparse, but there is only one component so it is still easier for a disease to diffuse quickly. Finally, the network centrality measure that is the highest is eigenvector centrality indicating that there is a solid core of well-connected nodes, which will help a disease diffuse more quickly if it is seeded in the core as opposed to the periphery.

Modeling Diffusion

To start modeling simple diffusion patterns, let’s look at some SI models. What happens if Anakin and Padme, key characters in the core of the network, are both seeded with a disease that has a threshold of 2. We know the pendants in the network will not become infected, but how quickly does the disease spread through the rest of the network? It only takes 4 steps! How quickly would a disease (with a threshold of 0.25, let’s call it “X”) spread from Anakin and Padme across the network if all the Jedi were immune? This diffusion takes 7 steps. How quickly would X spread across the network if it originated from Naboo? It would only take 3 steps. How does this compare if X originated from Tatooine instead? This would take 5 steps. This longer diffusion process makes sense as there are 8 individuals from Naboo and only 3 from Tatooine, even though those from Tatooine are deeply embedded in the core.

How quickly would X spread if it originated from the person with the highest centrality (Qui-Gon)? This took 7 steps! How about if X started at either of the pendants? The pendants are sufficiently isolated and connected to nodes that are well-connected enough for the threshold of 0.25 to keep X from diffusing at all. Let’s adjust the threshold to 1. In both cases, X diffuses from each pendant to the entire network within 4 steps, although the diffusion pattern is different. Looking at gifs of the two processes, we can see how PK-4 is further removed from the core as compared to Tarpals, so X diffuses more widely later in the process when starting from PK-4.

How does the diffusion pattern of X change if the threshold and initial seed nodes are changed? Barring other differences, if highly embedded nodes Anakin and Qui-Gon are seeded everyone in the network will become infected unless the threshold passes 0.33. However, if peripheral nodes Dofine and Tey How are seeded, X will only diffuse to the entire network if the threshold does not surpass 0.22 and it will not diffuse at all if the threshold rises to 0.26. This shows that the network location of the initial seeds will affect the final spread of this simple diffusion within this network. What if Qui-Gon is seeded with a disease that has a threshold of 0.25, but a transmissibility of 0.33 or 0.75?

## 
## Attaching package: 'purrr'
## The following objects are masked from 'package:igraph':
## 
##     compose, simplify
## The following object is masked from 'package:magrittr':
## 
##     set_names

On average, it would take at least 25 steps for X with a transmissibility rate of 0.33 to diffuse from Qui-Gon to the entire network, whereas if the rate is bumped up to 0.75 it can diffuse in less than 15 steps. Let’s keep the transmissibility rate of 0.75 and change to an SIR model by adding in a recovery rate of 0.2 (where an infected node will need an average of 5 steps to recover), comparing 1 run with 100? This added step keeps X from spreading What if we change the recovery rate to 0.8 (average of 1.25 steps)? The population is barely touched by X. What if we change the recovery rate to 0.05 (average of 20 steps)? The population is more vulnerable to X, but we still won’t have an epidemic. If we keep a recovery rate of 0.05 and change to an SIRS model by adding a waning parameter of 0.8 (meaning a node will return to susceptible status after about 1.25 steps), we can see that a majority of the network will continue to get infected. Finally, let’s keep the waning parameter of 0.8 and add in a latency parameter of 0.75, meaning it will take a node about 4 days to become infectious after exposure (an SEIRS model?). This keeps X at bay within the population, However, let’s change the latency parameter to 0.33 (it only takes 1.5 steps to become infectious) and see how that changes the diffusion pattern. Within our network, this means on average over half the population will continuously get infected.