Get startedGet started for free

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.

This exercise is part of the course

Case Studies: Network Analysis in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate reciprocity
actual_recip <- ___

# Calculate the order
n_nodes <- ___

# Calculate the edge density
edge_dens <- ___
Edit and Run Code