Session Ready
Exercise

Clustering and Reciprocity

Our previous work looking at the dyad census should give some intuition about how we expect other graph level metrics like reciprocity and clustering in our co-purchase graph to look. Recall that there are 10,754 edges in our graph of 10,245 vertices, and of those, more than 3,000 are mutual, meaning that almost 60 percent of the vertices have a mutual connection. What do you expect the clustering and reciprocity measures to look like given this information? We can test our intuition against a null model by simulating random graphs. In light of the results of our previous simulation, what do you expect to see here? Will reciprocity also be much higher than expected by chance?

The graph, amzn_g is available.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Calculate the reciprocity of amzn_g using reciprocity(), assigning to actual_recip.
  • Calculate the order of the graph with gorder(), assigning to n_nodes.
  • Calculate the edge density of the graph with edge_density(), assigning to edge_dens.