This project contains all code to replicate simulations in
Hypergraph Modeling of the Evolution of Team Relationships with Applications to Academic Funding Collaboration
by Ryan Haunfelder, Bailey Fosdick, and Haonan Wang.
Given holding parameters for the eight subgraphs, transition
probabilities between them, and a viewing length, the triad_sim
function generates a single observation from the CTMC model. The dyads
and triads column give each state of the simulated chain. Each chain
starts at the initial state h00, so the first row will
always have a dyad and triad value of 0.
lambda_true = c(1/250, 1/200, 1/200, 1/300, 1/300, 1/150 , 1/150)
names(lambda_true) = c("lambda00","lambda10","lambda20","lambda30","lambda01","lambda11","lambda21")
trans_probs_true = c(0.45, 0.45, 0.2, 0.45, 0.25, 0.3, 0.35, 0.35, 0.2, 0.3)
names(trans_probs_true) = c("p01|00","p10|00","p11|10","p20|10","p11|01",
"p21|11","p31|21","p31|30",
"p21|20","p30|20")
pars = c(lambda_true,trans_probs_true)
triad_sim(pars, 2000)
## dyads triads TimeBetween cumtime
## 1 0 0 489.7654 489.7654
## 2 0 1 1510.2346 Inf
The four simulation parameters are summarized in the table below.
| λ00 | λ10 | λ20 | λ30 | λ01 | λ11 | λ21 | |
|---|---|---|---|---|---|---|---|
| Simulation 1 | 250 | 200 | 200 | 300 | 300 | 150 | 150 |
| Simulation 2 | 500 | 100 | 100 | 150 | 150 | 200 | 200 |
| Simulation 3 | 200 | 100 | 100 | 150 | 400 | 450 | 450 |
| Simulation 4 | 200 | 400 | 400 | 450 | 100 | 150 | 150 |
| p(h01|h00) | p(h10|h00) | p(h11|h10) | p(h20|h10) | p(h11|h01) | p(h21|h11) | p(h31|h21) | p(h31|h30) | p(h21|h20) | p(h30|h20) | |
|---|---|---|---|---|---|---|---|---|---|---|
| Simulation 1 | 0.45 | 0.45 | 0.2 | 0.45 | 0.25 | 0.3 | 0.35 | 0.35 | 0.2 | 0.3 |
| Simulation 2 | 0.1 | 0.3 | 0.35 | 0.6 | 0.9 | 0.9 | 0.8 | 0.8 | 0.25 | 0.65 |
| Simulation 3 | 0.1 | 0.4 | 0.05 | 0.7 | 0.5 | 0.5 | 0.5 | 0.8 | 0.05 | 0.75 |
| Simulation 4 | 0.6 | 0.2 | 0.6 | 0.1 | 0.7 | 0.7 | 0.7 | 0.6 | 0.5 | 0.4 |
The wireframe plots