blob: da60df2676c43cc99fb25c27497e93e8491d065a (
plain)
1
2
3
4
5
6
7
8
9
10
|
# testing to see if pairs connected by high weight edges are more likely to both be
# victims than pairs connected by low weight edges. This would provide some evidence
# that high weight edges are important for transmitting infections.
v = rep(0,max(lcc_edges$weight))
for(w in 1:max(lcc_edges$weight)){
es = lcc_edges[lcc_edges$weight==w,1:2]
v[w] = mean(lcc_verts$vic[as.numeric(es$from)] & lcc_verts$vic[as.numeric(es$to)])
}
plot(v)
|