1. Learn
  2. /
  3. Courses
  4. /
  5. Case Studies: Network Analysis in R

Connected

Exercise

Assortativity and reciprocity

Another two key components of understanding our graphs are reciprocity and degree assort~ativity. Recall that reciprocity is the number of vertices that have connections going in each direction. Therefore, in the retweet graph, reciprocity is measuring the overall amount of nodes that retweet each other. In the mention graph, it will tell us how many nodes are conversing back and forth.

Assortitivity is a bit less obvious. Values greater than 0 indicate that vertices with high degrees tend to be connected to each other. However, values less than zero indicate a more degree disassortative graph. If you visualize the graph and see a hub and spoke type pattern, this is likely to be disassortative.

Instructions 1/2

undefined XP
  • 1
    • Use reciprocity() to calculate the reciprocity of retweet_graph.
    • Do the same for mention_graph.
    • Which graph has higher reciprocity?
  • 2
    • Use assortativity.degree() to calculate the assortativity degree of the directed graph retweet_graph.
    • Do the same for mention_graph.
    • Is assortativity positive or negative in each case?